-
Notifications
You must be signed in to change notification settings - Fork 253
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
sha2 automatic cpu feature detection? #319
Comments
In other words, your CPU has AVX2 extension, so SHA-512 gets SIMD accelerated, but SHA-256 uses the software backend because your CPU does not have SHA-NI extension. It could be worth looking into implementation of SSE backend for SHA-256 as described here. |
Thanks for the prompt and precise answer! IMHO and a you say, a |
As a general note: unless SHA-NI is employed, SHA-512 is somewhat counterintuitively expected to be faster than SHA-256 on 64-bit CPUs. |
Going to close this issue in favor of #327. |
Hi,
I'm not really sure about the state of sha256 performances right now, if some backend is autodetected or not, but here's what I get:
force-soft
feature: same performancesasm
feature: 30% better perfs for sha256, same perfs for sha512CPU used is :
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
TL;DR: is this normal and expected?
Feature autodetection for ciphers is a blessing (for instance for
AES
), I dunno if this is what you're aiming for hereanyway, keep up the good work and thanks again for all of this
no feature selected
force-soft
asm
The text was updated successfully, but these errors were encountered: