performance tweak : bt search w/ long repeated segments

This commit is contained in:
Yann Collet
2016-02-15 14:07:07 +01:00
parent cefef8cde7
commit b37e0a9241
2 changed files with 16 additions and 18 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ U32 ZSTD_BtGetAllMatches (
const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, U32 minml)
{
if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls, 0, 0);
return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 0, matches, minml);
}
@@ -292,7 +292,7 @@ U32 ZSTD_BtGetAllMatches_extDict (
const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, U32 minml)
{
if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls, 1, 0);
return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 1, matches, minml);
}