That actually doesn't help at all on my system. We ought to be inlining the array accesses, in which case LLVM can probably eliminate the bounds checks automatically.
On Thu, Feb 13, 2014 at 11:01 AM, Steven G. Johnson <[email protected]>wrote: > > > On Thursday, February 13, 2014 10:57:20 AM UTC-5, Steven G. Johnson wrote: > >> for i in 1:sieveTo >> > > Note that you can speed it up a bit more (by ~0.01s on my machine) by > changing this to > > @inbounds for i in 1:sieveTo > > to turn off bounds-checking in the loop (since all the array indices are > in bounds by construction). >
