Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zstd: Improve best encoder by extending backwards
The SpeedBestCompression encoder now extends matches backwards before estimating their encoded size, rather than doing this after selecting the best match. This is a bit slower, but produces smaller output. Benchmarks on amd64: name old speed new speed delta Encoder_EncodeAllSimple/best-8 20.7MB/s ± 3% 19.0MB/s ± 1% -8.04% (p=0.000 n=19+18) Encoder_EncodeAllSimple4K/best-8 19.2MB/s ± 6% 17.9MB/s ± 1% -6.86% (p=0.000 n=20+20) Output sizes on Silesia and enwik9: dickens 3220994 3179697 (× 0.987179) enwik9 259846164 257481474 (× 0.990900) mozilla 16912437 16895142 (× 0.998977) mr 3502823 3473770 (× 0.991706) nci 2306320 2300580 (× 0.997511) ooffice 2896907 2888715 (× 0.997172) osdb 3390548 3368411 (× 0.993471) reymont 1657380 1639490 (× 0.989206) samba 4329898 4315020 (× 0.996564) sao 5416648 5383855 (× 0.993946) webster 9972808 9887560 (× 0.991452) xml 542277 541018 (× 0.997678) x-ray 5733121 5681186 (× 0.990941) total 319728325 317035918 (× 0.991579) Wall clock time for compressing enwik9 goes up a bit, but is still close to what is was before klauspost#776.
- Loading branch information