Performance regression in 1.0.1

One of my programs which took 1mn on 1.0.0 takes 5mn on 1.0.1
I tracked at least part of the problem to the following code snippet:

function foo(gens,elts::Vararg{Vector{Int}})
  ee=collect(elts)
  for i in eachindex(gens)
    if let i=i
      all(w->w[i]>w[i+1],ee)
       end
      error("should not happen")
    end
  end
end

l=map(i->collect(1:5),1:4)
for i in 1:4 l[i][[i,i+1]]=l[i][[i+1,i]] end
const gens=l
const a=[2,1,3,4,5]
const b=[1,2,4,3,5]
test()=foo(gens,a,b)

On 1.0.0

julia> @btime test()
  176.287 ns (2 allocations: 128 bytes)

On 1.0.1:

julia> @btime test()
  695.735 ns (6 allocations: 192 bytes)

Does anyone know what’s happening here?

2 Likes

Please open an issue. I am running a bisect now to see what commit introduced it.

1 Like

I just noticed some regression on my code. It took 370 seconds on 1.0.0 last night, now takes 673.371075 seconds on 1.0.1.

Please let us know what you find as we are all very curious about this issue.

https://github.com/JuliaLang/julia/issues/29464

Seems like an innocent looking commit had some performance implication that our benchmark suite didn’t catch.

1 Like

It would be good if you could find out the source of the slow down or at least make it reproducible, and we can see if it is the same commit as in the first post.