]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Give Up on Searching End of Block
authorW. Felix Handte <w@felixhandte.com>
Wed, 18 Aug 2021 20:02:01 +0000 (16:02 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 1 Sep 2021 18:15:03 +0000 (14:15 -0400)
Amusingly, it seems to be a non-trivial performance hit to add in final
searches or even hash table insertions during cleanup. So let's not. It seems
to not make any meaningful difference in compression ratio.

lib/compress/zstd_fast.c

index f7df666811ea8b79eefa23898970bb5ec057cf67..50bceef74b4bc1afd9f87611107a984e3862cd22 100644 (file)
@@ -354,10 +354,9 @@ _start: /* Requires: ip0 */
     } while (ip2 < ilimit);
 
 _cleanup:
-
-    /* Find matches at end of block. */
-
-    /* TODO */
+    /* Note that there are probably still a couple positions we could search.
+     * However, it seems to be a meaningful performance hit to try to search
+     * them. So let's not. */
 
     /* save reps for next block */
     rep[0] = rep_offset1 ? rep_offset1 : offsetSaved;