Simple benchmarks to run to test WSL2 vs Windows Native

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):

$ 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:

$ 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

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/

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

1 Like