Benchmarks

Below are results from Codon's benchmark suite, which compares Python, PyPy, C++ and Codon on a range of tasks and applications. Benchmarks are run on the following setups:

  • 2021 16-inch MacBook Pro, Apple M1 Max, 64GB RAM, macOS Monterey 12.5.1
  • Python: 3.10.8
  • PyPy: 7.3.9 nightly build 2022-11-02, 106335-024a5669d75d
  • Clang: Apple clang version 13.1.6
  • Codon: 0.15.0, commit 5480050b0ae3fb39b30e3a71df260ce5e91e5064
  • CentOS Linux 7 (Core), 64 cores, Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz, 754 GB RAM
  • GPU: NVIDIA(R) Tesla V100
  • Python: 3.8.2
  • PyPy: 7.3.9
  • Clang: 13.0.1
  • Codon: 0.15.0, commit 5480050b0ae3fb39b30e3a71df260ce5e91e5064



Benchmark: float

pyperformance's float benchmark — performs a series of 3-dimensional vector operations and normalizations.

Benchmark: go

pyperformance's go benchmark — simulates and optimizes a game of Go.

Benchmark: nbody

pyperformance's nbody benchmark — simulates the movement of several celestial objects.

Benchmark: chaos

pyperformance's chaos benchmark — generates chaos game-like fractals.

Benchmark: spectral_norm

pyperformance's spectral_norm benchmark — computes the largest singular value of a particular infinite matrix.

Benchmark: set_partition

Computes all partitions of a set that fit certain conditions.

Benchmark: primes

Counts prime numbers below a given threshold. Codon version is multi-threaded.

Benchmark: binary_trees

Hans Boehm's binary-trees benchmark — creates and traverses a number of binary trees.

Benchmark: fannkuch

pyperformance's fannkuch benchmark — performs, for each permutation of a list, a number of element reversals until a certain condition is met, and computes the maximum number of reversals needed across all permutations. Codon version is multi-threaded.

Benchmark: word_count

Counts occurrences of words in a file using a dictionary.

Benchmark: taq

Performs volume peak detection on an NYSE TAQ.

Benchmark: mandelbrot

Computes the Mandelbrot set. Codon version is GPU-accelerated.

Benchmark: float

pyperformance's float benchmark — performs a series of 3-dimensional vector operations and normalizations.

Benchmark: go

pyperformance's go benchmark — simulates and optimizes a game of Go.

Benchmark: nbody

pyperformance's nbody benchmark — simulates the movement of several celestial objects.

Benchmark: chaos

pyperformance's chaos benchmark — generates chaos game-like fractals.

Benchmark: spectral_norm

pyperformance's spectral_norm benchmark — computes the largest singular value of a particular infinite matrix.

Benchmark: set_partition

Computes all partitions of a set that fit certain conditions.

Benchmark: primes

Counts prime numbers below a given threshold. Codon version is multi-threaded.

Benchmark: binary_trees

Hans Boehm's binary-trees benchmark — creates and traverses a number of binary trees.

Benchmark: fannkuch

pyperformance's fannkuch benchmark — performs, for each permutation of a list, a number of element reversals until a certain condition is met, and computes the maximum number of reversals needed across all permutations. Codon version is multi-threaded.

Benchmark: word_count

Counts occurrences of words in a file using a dictionary.

Benchmark: taq

Performs volume peak detection on an NYSE TAQ.

Benchmark: mandelbrot

Computes the Mandelbrot set. Codon version is GPU-accelerated.