# Drop of performances with Julia 1.6.0 for InterpolationKernels

**URL:** https://discourse.julialang.org/t/drop-of-performances-with-julia-1-6-0-for-interpolationkernels/58085
**Category:** Performance
**Created:** [March 27, 2021, 4:45pm UTC](https://discourse.julialang.org/t/drop-of-performances-with-julia-1-6-0-for-interpolationkernels/58085 "2021-03-27T16:45:48Z")
**Posts on this page:** 1
**Showing post:** 33

<div class="post-metadata">

### Author: ![jeremiedb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremiedb/32/29150_2.png) [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)
#### Post date: [March 31, 2021, 1:28pm UTC](https://discourse.julialang.org/t/drop-of-performances-with-julia-1-6-0-for-interpolationkernels/58085/33 "2021-03-31T13:28:01Z")

</div>

In case it’s worth, I also experienced significant slowdown in Julia 1.6 on loops where no tuples were involved:

```julia
using StatsBase:sample
using BenchmarkTools

n_obs = Int(1e6)
n_vars = 100
n_bins = 64
K = 3
𝑖 = collect(1:n_obs)
δ = rand(n_obs, K)
hist = zeros(K, n_bins, n_vars);
X_bin = sample(UInt8.(1:n_bins), n_obs * n_vars);
X_bin = reshape(X_bin, n_obs, n_vars);

function iter_1(X_bin, hist, δ, 𝑖)
    hist .= 0.0
    @inbounds for i in 𝑖
        @inbounds for k in 1:3
            hist[k, X_bin[i,1], 1] += δ[i,k]
        end
    end
end

𝑖_sample = sample(𝑖, Int(n_obs / 2), ordered=true)

```

`  
Julia 1.5.3:

```julia
julia> @btime iter_1($X_bin, $hist, $δ, $𝑖_sample)
  1.224 ms (0 allocations: 0 bytes)

```

Julia 1.6.0:

```julia
julia> @btime iter_1($X_bin, $hist, $δ, $𝑖_sample)
  1.648 ms (0 allocations: 0 bytes)

```

Adding `@simd` into the loop had little or no effect on performance (from 1.22ms to 1.19ms on 1.5.3 and 1.64ms to 1.62ms on 1.6.0)

---

_[View the full topic](https://discourse.julialang.org/t/drop-of-performances-with-julia-1-6-0-for-interpolationkernels/58085)._
