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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mandelbrot_benchmark-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2eb85f85638484e90fc42967b0ee919b163644b570bb89b41a0537f32471b919
MD5 72ef872f4dc12b3a8ddd397aefab62e4
BLAKE2b-256 62c69a13722193892f806ed543023c485d710086dbb28dd2c33e48f426a3030e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mandelbrot_benchmark-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d82324ee462bb98e9695739d6ef554e16baf9cfa15b6dccddc1c68be7dc707e
MD5 3150afe2ce63c9181485529740d6874c
BLAKE2b-256 039c9ac2e6efdfe037080c0404efdd12f372e8cc2ec921ec3989442d3f2622be

See more details on using hashes here.

Provenance

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