Compilation times for long static vectors are increasing

I recently got my hands on the 1.3 nightly binary and noticed a huge increase in compilation time for my code using static arrays. This goes against what I’ve noticed for most other code, which generally compiles faster on later versions of julia.

Below is a very simple benchmark with a very long static vector. For more complicated functions, the findings are the same for vectors of more moderate lengths (50-100).

Julia 1.1.0

julia> @time sum(@SVector(zeros(5000)))
 10.153586 seconds (20.04 M allocations: 927.505 MiB, 5.88% gc time)

Julia 1.2.0-DEV.647

julia> @time sum(@SVector(zeros(5000)))
 17.940720 seconds (30.00 M allocations: 1.436 GiB, 5.17% gc time)

Julia 1.3.0-DEV.249

julia> @time sum(@SVector(zeros(5000)))
 47.005255 seconds (30.24 M allocations: 1.445 GiB, 3.44% gc time)

This is slightly worrying as I now frequently think julia has crashed when several minutes are spent on compilation, for codes which previously ran quite fast.

Would be good to open an issue for this.

2 Likes

Issue: https://github.com/JuliaLang/julia/issues/32076