]> git.ipfire.org Git - thirdparty/zstd.git/commit
improve decompression speed of long variant by ~+5%
authorYann Collet <cyan@fb.com>
Fri, 7 May 2021 18:26:14 +0000 (11:26 -0700)
committerYann Collet <cyan@fb.com>
Fri, 7 May 2021 18:26:14 +0000 (11:26 -0700)
commit1db5947591a61222065af19d2bdeb79524b87086
treeb0683aa91e756fdf3700225e0370ee9e7a646b64
parentee425faaa72e6ae01ac785dfe4e21341a66a6ca4
improve decompression speed of long variant by ~+5%

changed strategy,
now unconditionally prefetch the first 2 cache lines,
instead of cache lines corresponding to the first and last bytes of the match.

This better corresponds to cpu expectation,
which should auto-prefetch following cachelines on detecting the sequential nature of the read.

This is globally positive, by +5%,
though exact gains depend on compiler (from -2% to +15%).
The only negative counter-example is gcc-9.
lib/decompress/zstd_decompress_block.c