Explore summation and loops using @simd and @inbounds with Julia
2018-08-11 Jeff Fessler, University of Michigan
Inspired by:
https://juliacomputing.com/blog/2017/09/27/auto-vectorization-in-julia.html
2020-08-05 Julia 1.5.0
2021-08-23 Julia 1.6.2

Test and time

The results above are for a 2017 iMac with 4.2GHz quad-core Intel Core i7 with macOS Mojave 10.14.6 and Julia 1.6.2. The @simd "for x in vector" loop is just as fast as calling sum().
However the loop with "for i=1:N" is slower unless accelerated by both @simd and @inbounds !