Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable DYNAMIC_BMI2 by default on x86 (32-bit mode) #4252

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Jan 19, 2025

Following #4251 and #4248,
it's now possible to get bmi2 working in x86 32-bit mode.

This development opens the opportunity to enable DYNAMIC_BMI2 automatically in 32-bit mode
(so far, it was only enabled for x64).

DYNAMIC_BMI2 will only capture a portion of the speed benefits of native bmi2 + avx2
as illustrated by below benchmark :

Decompression speed benchmark, measured on a i7-9700k, ubuntu 24.04, gcc 13.3.0:

dataset -m32 dev -m32 this PR (w/ DYNAMIC_BMI2) -m32 -mavx2 -mbmi2
silesia.tar 861 MB/s 898 MB/s 948 MB/s
calgary.tar 836 MB/s 864 MB/s 915 MB/s
enwik7 752 MB/s 782 MB/s 822 MB/s

As one can see, DYNAMIC_BMI2 does not match the speed of native bmi2 + avx2 (although it still outperforms the absence of bmi2). This discrepancy may be attributed to the specific benefits of avx2, which likely alleviates register pressure on the x86 architecture.

DYNAMIC_BMI2 can still be manually overridden, allowing it to be disabled as needed.

so far was only enabled for x64 (64-bit mode)
@Cyan4973 Cyan4973 merged commit 0c335c9 into dev Jan 20, 2025
96 checks passed
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.

2 participants