language-bench

Programming language benchmarks

Bun, C, C++, C#, Dart, Deno, Elixir, Fortran, F#, Go, Haskell, Java, Julia, Lua, Nim, Node.js, OCaml, Perl, PHP, PyPy, Python, R, Ruby, Rust and Scala measured on 11 workloads. Each benchmark is re-run on different days and different hardware; the numbers below combine 8 independent sessions across 2 CPU models. Click through to see exactly how any number came about.

C is the fastest overall, 1.78× ahead of Go; Python is 18× slower than the leader.
Last measured 8 sessions · 216 benchmarksWeigh the tasks yourself →

Added, waiting for their first benchmark sessions: Bun, C++, C#, Dart, Deno, Elixir, Fortran, F#, Haskell, Java, Julia, Lua, Nim, Node.js, OCaml, Perl, PHP, PyPy, R, Ruby, Rust, Scala. They join the leaderboard automatically once CI has measured them.

Time is the kernel time of a warm iteration (the program's work on one instance, after the warm-up). Geometric mean per task on an average machine, with how many times more than the best language in brackets (lower is better). Showing time; bars use a log scale.
#LanguageTime (× vs best)
1
C16
35.9 ms (1.00×)
2
Go1.27
63.8 ms (1.78×)
3
Python3.15
660 ms (18.4×)

What is being tested

Binary Trees

Allocate and walk millions of short-lived binary trees (depth 14).

Fannkuch-redux

Count pancake flips over all permutations of nine elements.

File processing

Stream a 49 MB CSV and aggregate it.

Hash map

One million inserts/updates and one million lookups in a hash map.

JSON parsing

Parse a 19 MB JSON document and aggregate its fields.

Matrix multiply

Multiply two dense 256×256 matrices of doubles.

N-Body simulation

Advance the Jovian planets 1,000,000 steps with a symplectic integrator.

Parallel reduction

Count primes below 2,000,000 with 4 workers.

Prime sieve

Sieve of Eratosthenes up to ten million.

Sorting

Sort two million pseudo-random 32-bit integers.

String operations

Build, scan and transform a 6.5 MB multilingual string.

How to read these numbers

Times are corrected for the speed of the machine (and the OS image) each session happened to run on, so sessions on different hardware can be combined. The number in brackets says how many times slower (or heavier) a language is than the best one in that table (1.0×). Hover a single-task value for its 95% confidence interval across sessions. See the methodology.

Frequently asked questions

Which programming language is the fastest?

Across the benchmark workloads, C is currently the fastest overall, followed by Go, Python. The leaderboard above shows the exact multipliers, per task and overall.

How are the benchmarks measured?

Each benchmark is a language version, a build setting and a problem. It runs on GitHub Actions in a pinned Docker image: the language's harness solves a fresh instance over and over for ten seconds and times only the solving, so start-up and input parsing do not count (end-to-end and cold times are reported too). Results from 8 sessions on different days and hardware are combined statistically, with machine speed factored out.

Can I trust these numbers?

Every number links to its source code, build flags, raw iterations and CI run. Ranges are 95% confidence intervals computed across independent sessions, and all raw data is open in the repository.