zstd/lib/compress
Arpad Panyik 8e4400463a Improve ZSTD_get1BlockSummary
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>
2025-07-10 18:20:49 +00:00
..
clevels.h initial commit 2023-01-04 13:01:54 -08:00
fse_compress.c reduce the amount of includes in "cover.h" 2024-03-13 11:29:28 -07:00
hist.c AArch64: Add SVE2 implementation of histogram computation 2025-06-11 12:14:22 +00:00
hist.h AArch64: Add SVE2 implementation of histogram computation 2025-06-11 12:14:22 +00:00
huf_compress.c add an assert 2025-03-22 18:23:31 -07:00
zstd_compress.c Improve ZSTD_get1BlockSummary 2025-07-10 18:20:49 +00:00
zstd_compress_internal.h Merge pull request #4317 from hirohira9119/fix-function-signature 2025-02-27 13:03:03 -08:00
zstd_compress_literals.c codemod: symbolEncodingType_e -> SymbolEncodingType_e 2024-12-20 10:36:56 -08:00
zstd_compress_literals.h fix root cause of #3416 2023-01-12 15:41:08 -08:00
zstd_compress_sequences.c codemod: ZSTD_defaultPolicy_e -> ZSTD_DefaultPolicy_e 2024-12-20 10:36:56 -08:00
zstd_compress_sequences.h codemod: ZSTD_defaultPolicy_e -> ZSTD_DefaultPolicy_e 2024-12-20 10:36:56 -08:00
zstd_compress_superblock.c codemod: repcodes_t -> Repcodes_t 2024-12-20 10:36:57 -08:00
zstd_compress_superblock.h initial commit 2023-01-04 13:01:54 -08:00
zstd_cwksp.h Remove extern C blocks from lib/* internal APIs (except xxhash.h) 2024-12-19 16:00:11 -08:00
zstd_double_fast.c codemod: ZSTD_matchState_t -> ZSTD_MatchState_t 2024-12-20 10:36:57 -08:00
zstd_double_fast.h Merge pull request #4218 from facebook/externC 2025-01-07 10:06:08 -08:00
zstd_fast.c codemod: ZSTD_matchState_t -> ZSTD_MatchState_t 2024-12-20 10:36:57 -08:00
zstd_fast.h Merge pull request #4218 from facebook/externC 2025-01-07 10:06:08 -08:00
zstd_lazy.c Revert "pass dictionary loading method as parameter" 2025-02-05 18:47:26 -08:00
zstd_lazy.h Merge pull request #4218 from facebook/externC 2025-01-07 10:06:08 -08:00
zstd_ldm.c update hrlog comment 2025-02-10 10:48:56 -08:00
zstd_ldm.h Merge pull request #4218 from facebook/externC 2025-01-07 10:06:08 -08:00
zstd_ldm_geartab.h initial commit 2023-01-04 13:01:54 -08:00
zstd_opt.c Revert "pass dictionary loading method as parameter" 2025-02-05 18:47:26 -08:00
zstd_opt.h Merge pull request #4218 from facebook/externC 2025-01-07 10:06:08 -08:00
zstd_preSplit.c added a test 2024-10-28 16:31:15 -07:00
zstd_preSplit.h Remove extern C blocks from lib/* internal APIs (except xxhash.h) 2024-12-19 16:00:11 -08:00
zstdmt_compress.c Revert "pass dictionary loading method as parameter" 2025-02-05 18:47:26 -08:00
zstdmt_compress.h Revert "pass dictionary loading method as parameter" 2025-02-05 18:47:26 -08:00