slightly nudge choices towards less sequences
also slightly improve some strange detrimental corner cases.dev
parent
f6ad59ab5c
commit
e2c0e3d437
|
@ -282,6 +282,8 @@ ZSTD_getMatchPrice(U32 const offset,
|
|||
price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel));
|
||||
}
|
||||
|
||||
price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less sequences -> faster decompression speed */
|
||||
|
||||
DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price);
|
||||
return price;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue