]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
deeper prefetching pipeline for decompressSequencesLong 2614/head
authorYann Collet <yann.collet.73@gmail.com>
Wed, 5 May 2021 17:04:03 +0000 (10:04 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Wed, 5 May 2021 17:04:03 +0000 (10:04 -0700)
pipeline increased from 4 to 8 slots.
This change substantially improves decompression speed when there are long distance offsets.
example with enwik9 compressed at level 22 :
gcc-9 : 947 -> 1039 MB/s
clang-10: 884 -> 946 MB/s

I also checked the "cold dictionary" scenario,
and found a smaller benefit, around ~2%
(measurements are more noisy for this scenario).

lib/decompress/zstd_decompress_block.c

index b980339a1d4aaa1a8419e4da424d891a0b4ef2c6..5419724dab75fab8226dc975bff85640f25eb487 100644 (file)
@@ -1254,9 +1254,9 @@ ZSTD_decompressSequencesLong_body(
 
     /* Regen sequences */
     if (nbSeq) {
-#define STORED_SEQS 4
+#define STORED_SEQS 8
 #define STORED_SEQS_MASK (STORED_SEQS-1)
-#define ADVANCED_SEQS 4
+#define ADVANCED_SEQS STORED_SEQS
         seq_t sequences[STORED_SEQS];
         int const seqAdvance = MIN(nbSeq, ADVANCED_SEQS);
         seqState_t seqState;