@inbounds code slower than one without

This has has been discussed before here. AVX512, like @mbauman’s machine, does have an instruction to convert Int64 to Float64, therefore it is fast for him.

AVX2 and earlier do not have the instruction. Using Int32 instead should work for these architectures, assuming

julia> typemax(Int32)
2147483647

is big enough.

2 Likes