From: Yann Collet Date: Wed, 12 Sep 2018 19:32:09 +0000 (-0700) Subject: adjust heuristic decisions X-Git-Tag: v0.0.29~13^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fb5ed3b314fca86f6c4a0f960cdd106108f6e08;p=thirdparty%2Fzstd.git adjust heuristic decisions --- diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index 3c08c19f4..5080b9439 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -612,7 +612,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, if (litCSize + lhSize > srcSize) return ERROR(corruption_detected); /* prefetch huffman table if cold */ - if (dctx->ddictIsCold && (litSize > 256 /* heuristic */)) { + if (dctx->ddictIsCold && (litSize > 768 /* heuristic */)) { PREFETCH_AREA(dctx->HUFptr, sizeof(dctx->entropy.hufTable)); } @@ -917,8 +917,7 @@ static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymb case set_repeat: if (!flagRepeatTable) return ERROR(corruption_detected); /* prefetch FSE table if used */ - if (ddictIsCold && (nbSeq > 16 /* heuristic */)) { - //if (ddictIsCold) { + if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { const void* const pStart = *DTablePtr; size_t const pSize = sizeof(ZSTD_seqSymbol) * (SEQSYMBOL_TABLE_SIZE(maxLog)); PREFETCH_AREA(pStart, pSize);