JuliaPerf / BenchmarksGame.jl

Other
43 stars 13 forks source link

Tweak mandelbrot-fast.jl for performance. #46

Open non-Jedi opened 4 years ago

non-Jedi commented 4 years ago

Multiple versions with different threadings included because different versions are faster depending on the machine. Depending on machine, gains can be over 20% compared to original mandelbrot-fast.jl.

I would appreciate input on relative timings for each of the scripts others see on their computer. For example, I get the following timings on two of my machines using hyperfine:

laptop with Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz desktop with Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz desktop with Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
mandelbrot-fast.jl (original) 2.492 1.864 1.788
mandelbrot-fast.jl 2.426 1.494 1.401
mandelbrot-fast.v2.jl 2.391 1.802 1.718
mandelbrot-fast.v3.jl 2.377 1.543 1.448
Best mandelbrot-fast.v3.jl mandelbrot-fast.jl mandelbrot-fast.jl

NOTE: running mandelbrot-fast.v3.jl requires installation of https://github.com/mohamed82008/KissThreading.jl

Changes included in every version:

non-Jedi commented 4 years ago

xref https://salsa.debian.org/benchmarksgame-team/benchmarksgame/issues/245