# Performance regression in 1.0.1

**URL:** https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763
**Category:** Performance
**Created:** [October 1, 2018, 10:51pm UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763 "2018-10-01T22:51:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Jean\_Michel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jean_michel/32/8282_2.png) [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)
#### Post date: [October 1, 2018, 10:51pm UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/1 "2018-10-01T22:51:25Z")

</div>

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:

```julia
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
julia> @btime test()
  176.287 ns (2 allocations: 128 bytes)

```

On 1.0.1:

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

```

Does anyone know what’s happening here?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [October 1, 2018, 11:33pm UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/2 "2018-10-01T23:33:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![LeoK987](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leok987/32/4880_2.png) [@LeoK987](https://discourse.julialang.org/u/LeoK987)
#### Post date: [October 2, 2018, 12:06am UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/3 "2018-10-02T00:06:56Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)
#### Post date: [October 2, 2018, 2:54am UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/4 "2018-10-02T02:54:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [October 2, 2018, 3:07am UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/5 "2018-10-02T03:07:18Z")

</div>

[https://github.com/JuliaLang/julia/issues/29464](https://github.com/JuliaLang/julia/issues/29464)

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

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [October 2, 2018, 3:28am UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763/6 "2018-10-02T03:28:43Z")

</div>

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.
