Closed rchincha closed 1 year ago
SGTM
@rchincha Do you plan to submit a PR?
@AkihiroSuda perhaps best to wait for this discussion to resolve. https://github.com/golang/go/issues/50543
The concerns on the Go issues are mostly around licensing. I think https://github.com/minio/sha256-simd/ is a different implementation that is apache2 licensed?
I pulled in the same library into go-containerregistry, which we use to build our images, and it was over 2x speedup in pushing images, so a huge improvement
Yes, and as I see it, couple of decisions to make here: 1) this perf improvement applicable only if CPU has sha_ni extensions available, and 2) do you want to wait for this to land in golang proper instead (for better support perhaps).
This might suffice to enable the simdized hasher:
package example
import (
"crypto"
sha256simd "github.com/minio/sha256-simd"
)
func init() {
crypto.RegisterHash(crypto.SHA256, sha256simd.New)
}
e.g.,
Considering the impressive perf gains, thoughts about pulling this in?
https://github.com/minio/sha256-simd