Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mandelbrot_benchmark-1.1.2.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mandelbrot_benchmark-1.1.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file mandelbrot_benchmark-1.1.2.tar.gz.

File metadata

  • Download URL: mandelbrot_benchmark-1.1.2.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mandelbrot_benchmark-1.1.2.tar.gz
Algorithm Hash digest
SHA256 5dadeb3a1606aef327bff4202ac060bf321aff5a1e7fca50e0323692459db396
MD5 388b1ea705c0162bf8098b695444dd3a
BLAKE2b-256 a8ba500016fb782b848941a1d03c8893f6fddb98786d559b3a2b3de2550378af

See more details on using hashes here.

Provenance

The following attestation bundles were made for mandelbrot_benchmark-1.1.2.tar.gz:

Publisher: ci.yml on 34j/mandelbrot-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mandelbrot_benchmark-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mandelbrot_benchmark-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c9050cd6923a0398e8c5d784a6ce8c2d6e52d4f1e3fee6ea1dc235a9390a516
MD5 54010159a468acbed5ae45cc0fb245a6
BLAKE2b-256 a9f71de363842f41c6c86d89aede63e46f7a04874d9ef4f229ec7ae72840c942

See more details on using hashes here.

Provenance

The following attestation bundles were made for mandelbrot_benchmark-1.1.2-py3-none-any.whl:

Publisher: ci.yml on 34j/mandelbrot-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page