mirror of
https://github.com/emmanuel-marty/lzsa.git
synced 2024-11-22 05:33:58 +00:00
Another LZSA2 compression speedup
This commit is contained in:
parent
cf49af5cda
commit
61698b5036
@ -481,14 +481,13 @@ static void lzsa_optimize_forward_v2(lzsa_compressor *pCompressor, const unsigne
|
||||
}
|
||||
|
||||
if (!exists) {
|
||||
int nScore = cur_arrival[j].score + 3 + nScorePenalty;
|
||||
int nn;
|
||||
|
||||
for (nn = n;
|
||||
nn < nMatchesPerArrival && pDestSlots[nn].cost == nCodingChoiceCost;
|
||||
nn++) {
|
||||
if (pDestSlots[nn].rep_offset == nMatchOffset &&
|
||||
(!nInsertForwardReps || pDestSlots[nn].rep_pos >= i || nScore >= (pDestSlots[nn].score + nDisableScore) ||
|
||||
(!nInsertForwardReps || pDestSlots[nn].rep_pos >= i ||
|
||||
pDestSlots[nMatchesPerArrival - 1].from_slot)) {
|
||||
exists = 1;
|
||||
break;
|
||||
@ -496,6 +495,8 @@ static void lzsa_optimize_forward_v2(lzsa_compressor *pCompressor, const unsigne
|
||||
}
|
||||
|
||||
if (!exists) {
|
||||
int nScore = cur_arrival[j].score + 3 + nScorePenalty;
|
||||
|
||||
for (; n < nMatchesPerArrival - 1; n++) {
|
||||
lzsa_arrival* pDestArrival = &pDestSlots[n];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user