# 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:

#### Apple M1 Max

- 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

#### Intel® Xeon® Gold

- 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

Speedup over Python

float

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

Benchmark: nbody

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

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

Benchmark: primes

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

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

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.

## Speedup over Python

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

Benchmark: nbody

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

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

Benchmark: primes

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

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

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

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

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

Runtime in seconds

float

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

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

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

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

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.

## Runtime in seconds

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

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

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.

## People Who Love Our Place

A descriptive paragraph that tells clients how good you are and proves that you are the best choice that they’ve made.

## Save time and book a call with us

Have a glance at the calendar to the left and select a good time for you.