Methodology
Everything is meant to be checkable. Every number on this site links to the raw iterations behind it, the exact source code, the build flags and the CI run that produced them.
From raw data to a number
- Raw: every kernel iteration and every end-to-end repetition, stored in data/sessions and downloadable per benchmark as
raw.csvon its page. - Per session: cold = first iteration, warm = median after the first 2 s, end-to-end = median of the repetitions.
- Per machine: a machine factor from benchmarks that ran in several sessions (below).
- Per benchmark: geometric mean over sessions of (session median ÷ machine factor), with a bootstrap interval; the index divides it by the fastest benchmark of the same problem.
Every benchmark page walks through these four steps with its own numbers, in a table you can check against the raw CSV.
What is a benchmark?
A benchmark is a unique combination of language version (for example Bun 1.4), build setting (compiler, flags, runtime options; for example bun) and problem (for example Binary Trees). Each is measured many times:
- Session: one GitHub Actions job on one fresh hosted VM. A session runs many different benchmarks (from all languages), each in the pinned official Docker image of its language. Hardware, kernel, OS image, Docker, hyperfine version and much more are recorded per session.
- Iteration: one solve of one instance inside the language's harness (see below). A session runs a benchmark's kernel loop until it has accumulated ten seconds of kernel time, so fast kernels yield thousands of iterations and slow ones a handful. A separate one-iteration run, timed with hyperfine 2.x, gives the end-to-end time of the whole process.
- Scheduling: the planner always picks the benchmarks with the fewest completed sessions, never the same benchmark twice in one session. A configurable share of every session re-runs already measured benchmarks. New sessions keep being started until every tracked benchmark has the configured number of sessions; then nothing runs until a new language release or build setting appears.
- New releases are discovered automatically. For every language the first release of every calendar year since its oldest supported release is tracked (one release per year, as long as an official Docker image exists), plus the newest release; this is what the timelines show.
How one benchmark is timed
Every language has one harness that all its problems share; a problem implementation only decodes an instance and solves it. The harness contract fixes the clock, the loop and the output, and a conformance test on a dummy problem checks every harness in CI.
- The timer wraps only
solve. Reading and decoding the instance, hashing the result and everything else happen outside the timed region, with the language's monotonic clock (nanoseconds where it has one). Anything that would otherwise reward a language for hiding work, such as lazy evaluation or unused results, is avoided because the result is fully hashed after every iteration. - The loop. Iterate until the summed kernel time reaches 10 s and at least 3 iterations ran. There is no other iteration cap; a hard timeout of 120 s marks a benchmark incomplete. Every iteration is recorded.
- Cold, warm and end-to-end. Cold is the first iteration (JIT compilation, class loading, caches, lazy initialisation). Warm is the median of the iterations after the first 2 s of kernel time, which is what steady-state throughput looks like once a runtime has settled. End-to-end is a single iteration from process start to exit, so it contains the runtime's start-up. The leaderboard defaults to warm kernel time; cold and end-to-end are one click away. The start-up problem is measured end-to-end only.
- Inputs. A new instance for every iteration, never reused, from one deterministic generator written once in C (lbgen; instance i is a pure function of i, so every language solves the same sequence). It streams the instance to the program's standard input as length-prefixed little-endian binary and blocks while the timer runs, so it does not compete for the CPU. The file-processing task is the exception: a fresh CSV is written to tmpfs before each iteration. For JSON the harness reads the bytes untimed and only parsing is timed. Sieve, fannkuch, binary trees, n-body steps and the parallel reduction have no instance and run the same parameters each iteration.
- Memory is measured from outside the process: a sampler on the host reads the anonymous memory of the container's cgroup every few milliseconds. We report the time-weighted average over the timed kernel regions (so instance generation and decoding do not count) and the peak.
- Correctness is checked separately: after every iteration the harness hashes the complete, ordered result (floating-point values rounded) and the runner compares the hashes of the first iterations with the references from the generator. A benchmark whose result differs counts as failed and never enters the statistics.
- Automatic flags mark suspicious results: a checksum mismatch, fewer than five iterations, an iteration far faster than the median (possible caching or skipped work), a warm-up curve that never settles, or a timeout. They are shown on the benchmark page and in the CSV.
Fair play
- Each language runs in the official Docker image of a pinned version, so toolchains are reproducible.
- Standard library only (except where noted per problem), same algorithm, same parameters, identical results. A CI workflow rebuilds and re-runs any implementation that changes and fails if its results differ from the generator's references.
- Fast-math and FMA contraction are disabled so floating-point results are identical in every language.
- Within a session the order of all benchmarks is randomised, so slow drift or noisy neighbours do not systematically favour one language.
- Every build setting is published, including ones that tie the binary to the CPU (
-march=native).
Statistics
Iterations in one session share the same VM and are correlated, so sessions are the independent samples. Iterations reduce noise within a session; they do not remove the systematic effect of a particular machine. We handle that effect statistically, without any calibration program:
- Per session: median, MAD, mean, standard deviation, min and max of the iterations (the warm ones for kernel time). Outliers (beyond 3 scaled MADs) are flagged but never removed.
- Machine factors from overlapping benchmarks: because the same benchmark is measured in several sessions, the speed difference between two machines is visible. Think of it as asking, for every machine, “how much longer does the same program take here than elsewhere?”. Formally, we fit
log(time) = benchmark + machineto all sessions simultaneously (alternating least squares): each time is explained as the benchmark's own difficulty plus a per-machine offset, on a log scale so that offsets become multiplicative factors. The machine factor says how much slower or faster a session's VM was than the average machine. This corrects for different CPU models and for slow or fast hosts on a given day. It assumes a machine is uniformly faster or slower across workloads; memory-bound and compute-bound workloads can scale differently, which shows up as residual noise. - Operating-system effect: GitHub's
ubuntu-latestimage changes over time (Ubuntu 24 today, Ubuntu 26 from October 2026), and a different kernel or libc can favour some workloads (file I/O, process start-up, memory allocation) more than others. Every session records its OS image. The model gets one extra term,log(time) = benchmark + machine + os[image, problem], shared by all sessions on the same image, so many sessions on one image pin down its effect together. The term is shrunk towards zero and centred per problem: a general speed shift of an image stays in the machine factors, and only the workload-specific deviation is attributed to the OS. With a single image the term is zero. - Across sessions: each benchmark's time on the average machine is the geometric mean of (session median ÷ machine factor ÷ OS factor). The 95% confidence interval comes from a cluster bootstrap (1000 iterations, deterministic seed) that resamples sessions, then iterations within each session. At most 100 evenly spaced iterations per session enter the bootstrap.
- Index vs fastest = time of a benchmark divided by the time of the fastest benchmark on the same problem (whichever language, release or build that is, so the baseline is not always C), with a bootstrap interval for the ratio. Composite scores over several problems are geometric means of indices.
- Memory is the time-weighted average memory of the timed kernel regions (and the peak), averaged over sessions; for the start-up task, the mean peak resident set size of hyperfine's runs.
- Does the correction work? The validation page shows how much the same benchmark disagrees between sessions before and after it.
- Benchmarks that are not (yet) linked to the main group of sessions through shared benchmarks, or that have fewer than 3 sessions, are labelled provisional.
Data and reproducibility
Everything is stored append-only in data/: one sessions/<session>.json file per session with its full environment (hardware, OS, kernel, Docker, hyperfine, runner image, trigger, scheduler decisions) and every measurement of that session: the kernel time of every iteration (so cold, warm and the whole warm-up curve), memory statistics and flags, the wall-clock, CPU, memory and exit-code values of the end-to-end run from hyperfine's JSON export, build and run commands and the source hash. Derived numbers are never stored; they are computed when the site is built using the open statistics code, which is unit-tested on synthetic data with known machine factors. You can re-run any benchmark locally with Docker.
Limits
- GitHub-hosted runners are shared VMs: expect noise, and different CPU models over time. That is exactly why every benchmark is repeated across sessions.
- Micro-benchmarks measure specific workloads. A language's result on one problem says little about a real application.
- Implementations are idiomatic-but-reasonable, not the most extreme hand-tuned versions. Pull requests with better implementations are welcome; CI verifies correctness.
- Check GitHub's Actions usage limits and terms before forking: public repositories use free standard runners, jobs are limited to 6 hours.