]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Move Prefetch Before Insertion; Speed Up ~6%
authorW. Felix Handte <w@felixhandte.com>
Thu, 13 Aug 2020 18:54:10 +0000 (14:54 -0400)
committerW. Felix Handte <w@felixhandte.com>
Thu, 10 Sep 2020 22:51:52 +0000 (18:51 -0400)
lib/compress/zstd_lazy.c

index 45b248472ca4a97e1e4a79ff5eba98ab658e000d..0ee9f6506cf04928c9f9e4be00b594afca1e34a3 100644 (file)
@@ -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) {