Oh, interesting, this is a regression in Julia 1.11. In Julia 1.10, the eachindex
and zip
versions perform identically. What’s happening is probably the same as in this thread: Nextfloat is slower on 2D array than on 1D array - #8 by Oscar_Smith; that is, inboundsness is no longer inferred when using eachindex
on 2D (or higher-dimensional) arrays.