Dear adventurous Go users who are playing with SIMD in 1.26 pre-release. Coding your feature checks like this:

func init() {
   useAVX512 = archsimd.X86.AVX512()
}

will yield not-best code, because the compiler is looking for guards that check archsimd.X86.AVX512() in order to (whenever there is a choice) enable the AVX512 versions of operations, e.g., mask registers versus bit masks, that sort of thing. (512-bit vectors will also force AVX512).

#golang #golangnuts