julia icon indicating copy to clipboard operation
julia copied to clipboard

Regression in performance of copying small vectors w/for loop

Open BioTurboNick opened this issue 5 months ago • 6 comments

From my small copying loops benchmarking in #45487, I noticed that copying small vectors of 1-5 elements with a for loop is slower on the nightly build than in 1.10:

image

(Though, awesome that the larger array for loops are now using SIMD automatically!)

It seems like the extra overhead comes from this new line:

https://github.com/JuliaLang/julia/blob/8eaf83c036f0962fca5e2d6a1bbc8eb48e6e5444/base/essentials.jl#L891

As array size increases, the relative cost of this line of code decreases

BioTurboNick avatar Feb 14 '24 19:02 BioTurboNick