# Array performance Julia 0.6 vs 0.5

**URL:** https://discourse.julialang.org/t/array-performance-julia-0-6-vs-0-5/9796
**Category:** Performance
**Created:** [March 18, 2018, 6:53pm UTC](https://discourse.julialang.org/t/array-performance-julia-0-6-vs-0-5/9796 "2018-03-18T18:53:41Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)
#### Post date: [March 19, 2018, 1:15am UTC](https://discourse.julialang.org/t/array-performance-julia-0-6-vs-0-5/9796/5 "2018-03-19T01:15:56Z")

</div>

> [@leoc](#):
>
> I was interested only in test for array comparison

I you want to test only the array comparison speed, then perhaps something like this is a better benchmark:

```julia
function speedtest(a, b)
    if VERSION < v"0.6.0"
        (a .< 7) & (b .< 7)
    else
        (a .< 7) .& (b .< 7)
    end
end

a = [1:10;]
b = 2*a + 1

using BenchmarkTools
@btime speedtest($a, $b)

```

I get the following times:

```julia
v0.5.2: 3.910 μs (11 allocations: 8.80 KiB)
v0.6.2: 641.472 ns (4 allocations: 4.33 KiB)
v0.7.0: 402.601 ns (3 allocations: 4.31 KiB)
```

---

_[View the full topic](https://discourse.julialang.org/t/array-performance-julia-0-6-vs-0-5/9796)._
