Skip to content

Add ZSTD_HASH_USE_CRC32C to use an optimized hash#4611

Open
danlark1 wants to merge 3 commits intofacebook:devfrom
danlark1:dev
Open

Add ZSTD_HASH_USE_CRC32C to use an optimized hash#4611
danlark1 wants to merge 3 commits intofacebook:devfrom
danlark1:dev

Conversation

@danlark1
Copy link
Contributor

@danlark1 danlark1 commented Mar 6, 2026

At Google we found 3-5% improvement for densely
compressed data when using CRC32C and low bits
of its hash.

Most uplift should be seen with at least -msse4.2 flag
for x86-64 and march=armv8-a+crc extension
(from Arm8.3 CRC is mandatory).

In this patch we added a macro, fixed implementation
details which relied on shifts and added CI tests with
different configurations. We also added a crc32c
regression test to compare sizes and verify it's not
regressing the values too much.

At Google we found 3-5% improvement for densely
compressed data when using CRC32C and low bits
of its hash.

Most uplift should be seen with at least `-msse4.2`
flag for x86-64 and march=armv8-a+crc extension
(from Arm8.3 CRC is mandatory).

In this patch we added a macro, fixed
implementation details which relied on shifts
and added CI tests with different configurations.
We also added a crc32c regression test to compare
sizes and verify it's not regressing the values too
much.
@meta-cla meta-cla bot added the CLA Signed label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant