Skip to main content
Version: Next (unreleased)

Benchmarks Game

The Computer Language Benchmarks Game has ten problems with official programs in many languages. The xisto ports live in bench/benchmarksgame/: NAME.ts is the plain program with types, and NAME-2.ts, NAME-3.ts, ... are optimized variants, some of them parallel through xisto:parallel or worker_threads. Every output is checked bit for bit against Node's.

Results (13 Nov 2026)​

comparisonApple M4Xeon E5-2686 v4Graviton2page
Xisto vs Rust (main 4a2f388)—9 wins, 1 tie9 wins, 1 tieXisto vs Rust
Xisto vs Node 26 (main e5fb066)10 wins9 wins (fasta not scored)9 wins (fasta not scored)Xisto vs Node
Xisto vs Bun 1.4 (main e5fb066)10 wins9 wins (reverse-complement not scored)10 winsXisto vs Bun

No problem is lost anywhere, and xisto's peak memory is at or below the other side's on every scored row (within 0.1 MB on fannkuch-redux against Rust on the Xeon; see Xisto vs Rust). Each page has the setup of its test, the tables per machine and the notes on each problem.

The ten problems​

problemsizeinputwhat it measures
spectral-norm5500—floating-point division and sums over an n×n matrix computed on the fly
n-body50,000,000 steps—floating-point arithmetic and sqrt on five bodies
fannkuch-redux12—permutations of small arrays, integer work
binary-trees21—allocating and freeing millions of small objects
mandelbrot16000—floating-point loops, output of a 32 MB bitmap
fasta25,000,000—random number generation and output (250 MB)
k-nucleotide—250 MB (fasta 25,000,000)hash tables over every substring of length 1–18
reverse-complement—250 MB (fasta 25,000,000)reading, transforming and writing large buffers
regex-redux—50 MB (fasta 5,000,000)regular expressions over a large string
pidigits10000—arbitrary-precision integers (GMP in C, Rust, Node BigInt)

How every run is measured​

  • Runner: bench/benchmarksgame/langs.py, from the repository root. For each problem it builds every xisto variant (NAME.ts, NAME-2.ts, ...) with build/xisto build, then runs each program of each side: one warm-up run, then 3 runs, and keeps the median wall time, the median CPU time and the highest peak RSS.
  • Measurement: bench/measure.py. Wall time from time.perf_counter around the whole run; CPU time (user + system) and peak RSS from wait4 on the child (on Linux through a small C launcher, bench/rusage.c, so the child's RSS does not start at Python's).
  • Output check: stdout goes through a pipe, is read whole and hashed (SHA-256). A program whose hash differs from xisto's is shown as DIFFERS and never scored; xisto's own output is checked against Node's by bench/benchmarksgame/run.py and by the test suite.
  • Inputs: the stdin files are made once with xisto's fasta (bench/benchmarksgame/out/fasta-25000000.txt and fasta-5000000.txt) and read from the page cache.
  • Scoring: bench/placar.py RESULTS [rust|node|bun] picks each side's fastest variant whose output matched, or a lighter one when it is close: up to 2% slower with at least 10% less memory, or 2–5% slower with at least 25% less (marked †). A row is a tie when the times are within 5%.
  • Builds: xisto with XISTO_CPU=native (the default binary is portable; Rust builds with target-cpu=native).
  • VMs: AWS t2.medium (Xeon E5-2686 v4, 2 vCPUs, AVX2, Ubuntu, clang 21) and t4g.small (Graviton2, Neoverse-N1, 2 vCPUs, Amazon Linux, clang 15). Both are burstable: each result file logs the steal counter before and after the round, and close results are confirmed with 9 interleaved runs (ab.py) before anything is changed.

The plain program against the optimized one (10 Nov 2026)​

The plain NAME.ts stays within 1.10× of the best optimized xisto variant on all 8 problems that have one, on both machines (bench/results/placar-final-2026-11-10.md):

problemXeon: plain ÷ optimizedGraviton2: plain ÷ optimized
fasta0.850.52
n-body0.950.96
spectral-norm0.991.07
reverse-complement1.010.90
mandelbrot1.041.01
binary-trees1.061.05
k-nucleotide1.080.95
fannkuch-redux1.091.00

See also​