-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Major performance regression on older Intel CPU #58
Comments
You should just use standard sha256 that comes with Go @greatroar this package is not useful otherwise. The purpose was to reduce the scope of this package and advise users to migrate to stdlib. |
You mean this package is essentially being deprecated? |
Correct @greatroar |
Ok, thanks for the heads up. |
sha256-simd is now deprecated minio/sha256-simd#58 This could slow down sha256 computation on some CPU
I don't think it makes sense to deprecate this package. Go standard library still does not support native SHA extensions. Best it can do is seems to be AVX2, even for modern CPUs, which results in a roughly ~5x difference. From syncthing:
|
We are reducing the maintenance cost of this package, so it will be kept as long as there are benefits. For CPUs with SHA extensions the benefit is clear, and AVX512 can have a benefit as well, but requires special implementations. If you want a version which detects older CPUs and use the SSE/AVX code feel free to fork it. |
@klauspost thank you. I'm mainly interested in SHA Extensions for x86 and ARM64 for ARM |
On arm64, stdlib has used the SHA extensions since 2017: golang/go@7b8a7f8. |
I got the following benchmark results for sha256-simd v0.1.1 on an Intel Core i7-3770K (Go 1.16.2, Linux):
Performance of the GEN version is unchanged in v1.0.0, as expected, so dropping the SSSE/AVX asm version reduces throughput by a third on this CPU. sha256-simd is no longer faster than the stdlib implementation.
Would you consider resurrecting the SSSE asm?
The text was updated successfully, but these errors were encountered: