Skip to content

34j/mandelbrot-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

245 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mandelbrot-benchmark

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://mandelbrot-benchmark.readthedocs.io

Source Code: https://github.com/34j/mandelbrot-benchmark


Benchmark Numba, Taichi, Warp, CuPy Kernel, Triton using Mandelbrot set

Results

  • 200 iterations max
  • $c \in [-2, 1] \times [-1.5, 1.5]$
  • JAX version is quite hacky ("vectorized")
  • JAX version is omitted because it makes the benchmark unstable (see previous release for the comparison)
  • AMD Ryzen 9 3950X + NVIDIA GeForce RTX 4070 SUPER

Results

  • The results are almost identical when device = cuda
  • The computation time for Numba is quite unstable

Mandelbrot Set

Some notes

  • In Numba, the type of variables needs to be explicitly specified to use float32 instead of float64 (default), while is not the case for Taichi, Warp.

Installation

Install this via pip (or your favourite package manager):

pipx install mandelbrot-benchmark

Usage

Run the benchmark and plot the results:

mandelbrot-benchmark benchmark
mandelbrot-benchmark plot

Alternatives

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

About

Benchmark Numba, Taichi, Warp, JAX using Mandelbrot set

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors