add hashtable head prefetching

dev
Bimba Shrestha 2020-06-11 22:54:36 -07:00 committed by W. Felix Handte
parent 5d5507788d
commit 145c2d12f9
1 changed files with 5 additions and 0 deletions

View File

@ -525,6 +525,11 @@ size_t ZSTD_HcFindBestMatch_generic (
/* HC4 match finder */ /* HC4 match finder */
U32 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); U32 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls);
if (dictMode == ZSTD_dictMatchState && ms->dictMatchState->enableDedicatedDictSearch)
PREFETCH_L1(ms->dictMatchState->hashTable +
(ZSTD_hashPtr(ip, ms->dictMatchState->cParams.hashLog - DD_BLOG,
ms->dictMatchState->cParams.minMatch) << DD_BLOG));
for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) { for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) {
size_t currentMl=0; size_t currentMl=0;
if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) {