I see that the github.com/klauspost/cpuid is being used for avx2 and sse4 detection here:
|
HasAVX2 = cpuid.CPU.Has(cpuid.AVX2) && |
|
os.Getenv("BLAKE3_DISABLE_AVX2") == "" && |
|
os.Getenv("BLAKE3_PUREGO") == "" |
|
|
|
HasSSE41 = cpuid.CPU.Has(cpuid.SSE4) && |
|
os.Getenv("BLAKE3_DISABLE_SSE41") == "" && |
|
os.Getenv("BLAKE3_PUREGO") == "" |
Is there any particular reason to not use the Go team's implementation?
https://pkg.go.dev/golang.org/x/sys/cpu