mirror of
https://github.com/facebook/zstd
synced 2026-08-22 22:32:07 -04:00
Add a faster scalar implementation of ZSTD_get1BlockSummary which removes the data dependency of the accumulators in the hot loop to leverage the superscalar potential of recent out-of-order CPUs. The new algorithm leverages SWAR (SIMD Within A Register) methodology to exploit the capabilities of 64-bit architectures. It achieves this by packing two 32-bit data elements into a single 64-bit register, enabling parallel operations on these subcomponents while ensuring that the 32-bit boundaries prevent overflow, thereby optimizing computational efficiency. Corresponding unit tests are included. Relative performance to GCC-13 using: `./fullbench -b19 -l5 enwik5` Neoverse-V2 before after GCC-13: 100.000% 290.527% GCC-14: 100.000% 291.714% GCC-15: 99.914% 291.495% Clang-18: 148.072% 264.524% Clang-19: 148.075% 264.512% Clang-20: 148.062% 264.490% Cortex-A720 before after GCC-13: 100.000% 235.261% GCC-14: 101.064% 234.903% GCC-15: 112.977% 218.547% Clang-18: 127.135% 180.359% Clang-19: 127.149% 180.297% Clang-20: 127.154% 180.260% Co-authored by, Thomas Daubney <Thomas.Daubney@arm.com> |
||
|---|---|---|
| .. | ||
| clevels.h | ||
| fse_compress.c | ||
| hist.c | ||
| hist.h | ||
| huf_compress.c | ||
| zstd_compress.c | ||
| zstd_compress_internal.h | ||
| zstd_compress_literals.c | ||
| zstd_compress_literals.h | ||
| zstd_compress_sequences.c | ||
| zstd_compress_sequences.h | ||
| zstd_compress_superblock.c | ||
| zstd_compress_superblock.h | ||
| zstd_cwksp.h | ||
| zstd_double_fast.c | ||
| zstd_double_fast.h | ||
| zstd_fast.c | ||
| zstd_fast.h | ||
| zstd_lazy.c | ||
| zstd_lazy.h | ||
| zstd_ldm.c | ||
| zstd_ldm.h | ||
| zstd_ldm_geartab.h | ||
| zstd_opt.c | ||
| zstd_opt.h | ||
| zstd_preSplit.c | ||
| zstd_preSplit.h | ||
| zstdmt_compress.c | ||
| zstdmt_compress.h | ||