# Julia slower in Windows

**URL:** <https://discourse.julialang.org/t/julia-slower-in-windows/21027>\
**Category:** Performance\
**Created:** [February 20, 2019, 10:52pm UTC](https://discourse.julialang.org/t/julia-slower-in-windows/21027 "2019-02-20T22:52:13Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![bennedich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bennedich/32/4894_2.png) [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Post date:** [February 22, 2019, 11:49pm UTC](https://discourse.julialang.org/t/julia-slower-in-windows/21027/17 "2019-02-22T23:49:34Z")

</div>

> [@c42f](#):
>
> What does the distribution of times look like in (terms of min,max,median and quartiles for example)?

We can use the script below to plot creation speed histograms for `zeros` for a range of array sizes.

```julia
using Plots

benchmark_op(m) = zeros(m * 128)

anim = @animate for n = 1:1280
    t = 1e6(1:10000 .|>_-> @elapsed benchmark_op(n)) / n * 1024
    display(histogram(log10.(filter(k -> 88 < k < 640, [t;89;640])),
        nbins=120, xlims=(1.95,2.8), ylims=(0,2000), legend=:none,
        xformatter=x->round(Int, 10^x), title="array = $n KiB",
        xlabel="creation speed (us / MB)", ylabel="count"))
end

gif(anim, "allocations.gif", fps = 30)

```

Below are the results for a Windows 10 laptop. Note how creation speeds faster than ~300 μs/MiB completely disappear when the array is larger than 1024 KiB.

![allocations](https://global.discourse-cdn.com/julialang/original/3X/5/a/5ac117f58f07aeb9a55b860b86fa8dd0577f150b.gif)

---

_[View the full topic](https://discourse.julialang.org/t/julia-slower-in-windows/21027)._
