With SIMD it is normal to iterate a slice let's say 8 elements at a time. Sadly this incurs a bound check:
const step = 8
for i := 0; i <= len(x)-step; i += step {
_ = x[i : i+step] // Unnecessary bound check here :'(
}
Comment From: TapirLiu
also for
for i := 0; i <= len(x)-step; i += step {
_ = x[i+step-1] // Unnecessary bound check here :'(
}
see https://github.com/golang/go/issues/40987