Convert Outer Control Structure to Loop
This commit is contained in:
@@ -104,8 +104,8 @@ size_t ZSTD_compressBlock_doubleFast_noDict_generic(
|
|||||||
if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
|
if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_start:
|
/* Outer Loop: one iteration per match found and stored */
|
||||||
|
while (1) {
|
||||||
step = 1;
|
step = 1;
|
||||||
nextStep = ip + kStepIncr;
|
nextStep = ip + kStepIncr;
|
||||||
ip1 = ip + step;
|
ip1 = ip + step;
|
||||||
@@ -118,7 +118,7 @@ _start:
|
|||||||
idxl0 = hashLong[hl0];
|
idxl0 = hashLong[hl0];
|
||||||
matchl0 = base + idxl0;
|
matchl0 = base + idxl0;
|
||||||
|
|
||||||
/* Main Search Loop */
|
/* Inner Loop: one iteration per search / position */
|
||||||
do {
|
do {
|
||||||
const size_t hs0 = ZSTD_hashPtr(ip, hBitsS, mls);
|
const size_t hs0 = ZSTD_hashPtr(ip, hBitsS, mls);
|
||||||
const U32 idxs0 = hashSmall[hs0];
|
const U32 idxs0 = hashSmall[hs0];
|
||||||
@@ -169,9 +169,9 @@ _start:
|
|||||||
hl0 = hl1;
|
hl0 = hl1;
|
||||||
idxl0 = idxl1;
|
idxl0 = idxl1;
|
||||||
matchl0 = matchl1;
|
matchl0 = matchl1;
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
PREFETCH_L1(ip+256);
|
PREFETCH_L1(ip+256);
|
||||||
#endif
|
#endif
|
||||||
} while (ip1 <= ilimit);
|
} while (ip1 <= ilimit);
|
||||||
|
|
||||||
_cleanup:
|
_cleanup:
|
||||||
@@ -247,9 +247,9 @@ _match_stored:
|
|||||||
ip += rLength;
|
ip += rLength;
|
||||||
anchor = ip;
|
anchor = ip;
|
||||||
continue; /* faster when present ... (?) */
|
continue; /* faster when present ... (?) */
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
goto _start;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user