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.3.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.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mandelbrot_benchmark-1.1.3.tar.gz
Algorithm Hash digest
SHA256 cba56a8f21f8a74819293b30a4ce3bd2c118172bb06b7b02616223779819e36b
MD5 d4fc91ecc0cd558c1324f617c1ee5d1e
BLAKE2b-256 8c504612db38584cb560264e70b6f6d8b477f134ef22cdb23b6507f100b162a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mandelbrot_benchmark-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 645134bfe4c8d2e7b0a69e3843ef0531b8835c188b2ec154f08ddf5447888536
MD5 2c869b27cef816488b8c80cb5ea73bb7
BLAKE2b-256 5183433d2dfdbe2bee64c49f4e14fe229489505fe77762536e201024492b496b

See more details on using hashes here.

Provenance

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