From: W. Felix Handte Date: Thu, 13 Aug 2020 18:54:10 +0000 (-0400) Subject: Move Prefetch Before Insertion; Speed Up ~6% X-Git-Tag: v1.4.7~81^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a494111385bd7d61dbf8f4e3d817e51d2ba6a81c;p=thirdparty%2Fzstd.git Move Prefetch Before Insertion; Speed Up ~6% --- diff --git a/lib/compress/zstd_lazy.c b/lib/compress/zstd_lazy.c index 45b248472..0ee9f6506 100644 --- a/lib/compress/zstd_lazy.c +++ b/lib/compress/zstd_lazy.c @@ -531,14 +531,14 @@ size_t ZSTD_HcFindBestMatch_generic ( U32 matchIndex; - /* HC4 match finder */ - matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); - if (dictMode == ZSTD_dedicatedDictSearch) { const U32* entry = &dms->hashTable[ddsIdx]; PREFETCH_L1(entry); } + /* HC4 match finder */ + matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); + for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) { size_t currentMl=0; if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) {