-
Notifications
You must be signed in to change notification settings - Fork 256
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
Small performance regression in x/crypto XChaCha20 implementation #828
Comments
GOAMD64=v2 sounds good. Care to add it build.bash and make a PR? |
zp
added a commit
to zp/gocryptfs
that referenced
this issue
Mar 17, 2024
Enables older CPUs (2008-2013) to take advantage of certain hardware accelerators. Closes rfjakob#828
rfjakob
pushed a commit
that referenced
this issue
Apr 18, 2024
Enables older CPUs (2008-2013) to take advantage of certain hardware accelerators. Closes #828
Reported to Go upstream as golang/go#67240 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When building gocryptfs from current master source 9958b63, there is a small? (might vary cpu to cpu) performance regression with XChaCha20-Poly1305-Go
speed benchmark with 2.4.0
speed benchmark with 9958b63
Diagnosing this it appears that x/crypto has locked certain cpu acceleration/optimization behind proper flags, specifically this commit, as it was previously just always enabled (even if it wasn't actually supported by the cpu)
Go seems to build with GOAMD64=v1 by default, for what I assume is maximum compatibility
Building with GOAMD64=v2 re-enables the optimizations bringing it back to 2.4.0 performance
speed benchmark with 9958b63 and GOAMD64=v2
I propose to just build gocryptfs going forward with GOAMD64=v2 (at least for the static amd64 build on github releases), possibly providing a default v1 build for legacy support, as according to this chart v2 extensions date back to 2008.
The text was updated successfully, but these errors were encountered: