Perhaps the optimizer unrolls the inner loop, and thus can skip safety checks.
Naively, seems trickier to do for the iterator.
> El ene. 4, 2017, a las 9:10 PM, Jens Persson via swift-users
> escribió:
>
> I noticed disabling safety checks made the custom Iterator as
Thanks, I wonder if it is currently impossible to make it as fast as the
nested for loops, ie that some optimizer improvement could fix it.
Here's a stripped down version of my code:
import QuartzCore // This is just for timing using CACurrentMediaTime()
struct Point2DInt {
var x: Int