]> git.ipfire.org Git - thirdparty/zstd.git/commit
Improves decompression speed when using cold dictionary 1411/head
authorYann Collet <cyan@fb.com>
Fri, 9 Nov 2018 01:00:23 +0000 (17:00 -0800)
committerYann Collet <cyan@fb.com>
Fri, 9 Nov 2018 01:00:23 +0000 (17:00 -0800)
commit483759a3de5545188eac00797fe46b5d99250aa6
tree7efc1dae6482eb5377e732598f98ec9001208c88
parent20fb9e7f36f004d6509cfb3b07be7fdeafee0f63
Improves decompression speed when using cold dictionary

by triggering the prefetching decoder path
(which used to be dedicated to long-range offsets only).

Figures on my laptop :
no content prefetch : ~300 MB/s (for reference)
full content prefetch : ~325 MB/s (before this patch)
new prefetch path : ~375 MB/s (after this patch)

The benchmark speed is already significant,
but another side-effect is that this version
prefetch less data into memory,
since it only prefetches what's needed, instead of the full dictionary.

This is supposed to help highly active environments
such as active databases,
that can't be properly measured in benchmark environment (too clean).

Also :
fixed the largeNbDict test program
which was working improperly when setting nbBlocks > nbFiles.
contrib/largeNbDicts/Makefile
contrib/largeNbDicts/largeNbDicts.c
lib/decompress/zstd_ddict.c
lib/decompress/zstd_decompress.c
lib/decompress/zstd_decompress_block.c