# @inbounds code slower than one without

**URL:** <https://discourse.julialang.org/t/inbounds-code-slower-than-one-without/21550>\
**Category:** General Usage\
**Created:** [March 6, 2019, 9:11pm UTC](https://discourse.julialang.org/t/inbounds-code-slower-than-one-without/21550 "2019-03-06T21:11:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [March 6, 2019, 10:37pm UTC](https://discourse.julialang.org/t/inbounds-code-slower-than-one-without/21550/6 "2019-03-06T22:37:23Z")

</div>

This has has been discussed before [here](https://discourse.julialang.org/t/simple-loop-wont-vectorize/20169). 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
julia> typemax(Int32)
2147483647

```

is big enough.

---

_[View the full topic](https://discourse.julialang.org/t/inbounds-code-slower-than-one-without/21550)._
