Documentation: https://mandelbrot-benchmark.readthedocs.io
Source Code: https://github.com/34j/mandelbrot-benchmark
Benchmark Numba, Taichi, Warp, CuPy Kernel, Triton using Mandelbrot set
- 200 iterations max
$c \in [-2, 1] \times [-1.5, 1.5]$ - JAX version is quite hacky ("vectorized")
-
JAXversion is omitted because it makes the benchmark unstable (see previous release for the comparison) - AMD Ryzen 9 3950X + NVIDIA GeForce RTX 4070 SUPER
- The results are almost identical when
device = cuda - The computation time for
Numbais quite unstable
- In
Numba, the type of variables needs to be explicitly specified to usefloat32instead offloat64(default), while is not the case forTaichi,Warp.
Install this via pip (or your favourite package manager):
pipx install mandelbrot-benchmarkRun the benchmark and plot the results:
mandelbrot-benchmark benchmark
mandelbrot-benchmark plot- YanagiAyame/python-mandelbrot-benchmark: Which is better, Numba, Taichi, Warp or JAX?
- mandelbrot-on-all-accelerators.ipynb
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
This package was created with Copier and the browniebroke/pypackage-template project template.

