# Simple benchmarks to run to test WSL2 vs Windows Native

**URL:** <https://discourse.julialang.org/t/simple-benchmarks-to-run-to-test-wsl2-vs-windows-native/40343>\
**Category:** Performance\
**Created:** [May 28, 2020, 3:02pm UTC](https://discourse.julialang.org/t/simple-benchmarks-to-run-to-test-wsl2-vs-windows-native/40343 "2020-05-28T15:02:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [May 28, 2020, 5:00pm UTC](https://discourse.julialang.org/t/simple-benchmarks-to-run-to-test-wsl2-vs-windows-native/40343/4 "2020-05-28T17:00:59Z")

</div>

I would like to see these benchmarks (some or all, at least some multi-threaded too, i.e. where load is close to 100% on more than one of the four), but note it’s expected to get better numbers, e.g. I do roughly 2x on my Linux box (some programs there are faster with lower opt settings, I was meaning to point out, and NOT asking for threads):

> **[Julia vs Java - Which programs are fastest?](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/julia.html)**
>
> Julia Java - Which programs have fastest performance?

```julia
$ hyperfine '~/julia-1.6.0-DEV-8f512f3f6d/bin/julia -O0 --cpu-target=core2 --startup-file=no pidigits.jl 10000 >/dev/null'
Benchmark #1: ~/julia-1.6.0-DEV-8f512f3f6d/bin/julia -O0 --cpu-target=core2 --startup-file=no pidigits.jl 10000 >/dev/null
  Time (mean ± σ): 1.292 s ± 0.054 s [User: 1.669 s, System: 0.501 s]
  Range (min … max): 1.196 s … 1.366 s 10 runs

```

And please time “first-plot”, in another discourse thread, where I showed this recently, someone said this doesn’t work on Windows:

```julia
$ sudo apt-get install gnuplot

$ time ~/julia-1.5-ea669c3d3e/bin/julia -O1 --compile=min --startup-file=no -e "using Gaston; display(plot(rand(10)))"

real	0m0,691s # without display 0m0,400s, and also try other settings.
user	0m0,768s
sys	0m0,542s

```

> **[Comparing WSL Versions](https://learn.microsoft.com/en-us/windows/wsl/compare-versions)**
>
> WSL 2 provides the benefits of WSL 1, but uses an actual Linux kernel, rather than a translation layer like WSL 1, resulting in faster performance.

> File intensive operations like git clone, npm install, apt update, apt upgrade, and more are all be noticeably faster with WSL 2. […] WSL 2 run up to 20x faster compared to WSL 1

[https://www.reddit.com/r/bashonubuntuonwindows/comments/bn9pfi/difference\_between\_wsl2\_and\_bare\_bones\_virtual/](https://www.reddit.com/r/bashonubuntuonwindows/comments/bn9pfi/difference_between_wsl2_and_bare_bones_virtual/)

> WSL 2 is a virtual machine, but in their words “not like any VM you’ve seen before”. They utilize a very minimal HyperV toolset to run the Linux kernel.

I’m not sure how helpful this thread is or possibly outdated:  
[https://dev.to/lietux/comment/l6dl](https://dev.to/lietux/comment/l6dl)

---

_[View the full topic](https://discourse.julialang.org/t/simple-benchmarks-to-run-to-test-wsl2-vs-windows-native/40343)._
