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];
|
||||||
@@ -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