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")

Results

  • The results are almost identical when device = cuda
  • The computation time for Numba is quite unstable
  • Numba and JAX are fast when device = cpu and the number of pixels is large

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.0.tar.gz (11.7 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.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mandelbrot_benchmark-1.1.0.tar.gz
  • Upload date:
  • Size: 11.7 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.0.tar.gz
Algorithm Hash digest
SHA256 a88a7b530441faf2e91337978dde07418995a0351632b260df8b62a937489b1d
MD5 911ab278765c8aa95dbd1db5394b9302
BLAKE2b-256 f3c43bc7ff50c9f43a25595052382133d215e2459ee80e41fb9e866071c09aea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mandelbrot_benchmark-1.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mandelbrot_benchmark-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e673504017db937998ce5f08bb15f623e183dd55d2d4b15fd4a7d7d6d0efe13
MD5 59f365e748439fc3e7282cca8ac00c96
BLAKE2b-256 f465a26e54d9fe839968d9388715ed62b37b3ae8a645cb43226749bc499ff57e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mandelbrot_benchmark-1.1.0-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