Results:
forcebru ~/t/julia_numpy_bench> ipython bench.ipy
Python with Nx=50000, Np=500...
9.84 ms ± 73 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
forcebru ~/t/julia_numpy_bench> julia-1.6 bench.jl
Julia with Nx=50000, Np=500...
Trial(32.285 ms)
forcebru ~/t/julia_numpy_bench> julia-1.6 -O3 bench.jl
Julia with Nx=50000, Np=500...
Trial(32.353 ms)
forcebru ~/t/julia_numpy_bench>
So, Julia's mean is 32 ms, while NumPy's mean is 10 ms. Julia's linear algebra is somehow 3 times (!) slower than NumPy's?
forcebru ~/t/julia_numpy_bench> julia-1.6 -O3 bench.jl
Julia with Nx=200000, Np=500...
Trial(130.351 ms)
forcebru ~/t/julia_numpy_bench> julia-1.6 bench.jl
Julia with Nx=200000, Np=500...
Trial(130.097 ms)
forcebru ~/t/julia_numpy_bench> ipython bench.ipy
Python with Nx=200000, Np=500...
41 ms ± 167 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
forcebru ~/t/julia_numpy_bench>
Still 3 times slower...