Canonical cross-language benchmarks

This page reports one complete local run of the canonical benchLANG suite on 2026-07-12. All 19 configured language implementations completed all five workloads with valid results.

The suite was run on Linux 7.0.0 x86-64 with an AMD Ryzen 9 5900X (12 cores, 24 threads) and 30 GiB of RAM. Each language was compiled once and executed once. The machine was not isolated, its CPU frequency was not locked, and other system load was present, so these measurements are a reproducible snapshot, not a claim of statistically stable rankings.

The canonical workloads are:

Execution time is the workload's internal elapsed time. Compile time is the elapsed time for the suite build. LOC counts the complete source file for that language. Peak RSS is measured for the complete suite process with /usr/bin/time -v, and binary size is the complete generated suite artifact. Because all five workloads share one source file, build, LOC, RSS, and binary metrics repeat in each workload table. — means that the source-launch, JIT-driven, or interpreted execution path did not produce a separately measured compile phase or standalone binary.

Prime sieve

Language Execution (s) Compile (s) LOC Peak RSS Binary
C 2.608 0.33 172 33.1 MiB 28.3 KiB
Rust 2.609 2.69 142 33.3 MiB 2.04 MiB
Nim 2.612 1.44 119 50.0 MiB 52.1 KiB
Zig 2.612 4.23 180 32.9 MiB 204.0 KiB
D 2.614 3.10 133 97.3 MiB 1.13 MiB
Java 2.615 — 127 561.8 MiB —
Fortran 2.616 0.59 233 33.6 MiB 32.5 KiB
Ada 2.617 0.98 224 34.8 MiB 48.7 KiB
seed 2.622 0.84 218 33.2 MiB 27.8 KiB
C# 2.630 4.37 129 116.9 MiB 77.1 KiB
JavaScript (Bun) 2.649 — 108 342.8 MiB —
JavaScript (Node) 2.663 — 108 303.2 MiB —
Dart 2.905 1.22 130 69.8 MiB 6.45 MiB
Go 3.054 2.83 157 52.9 MiB 1.53 MiB
OCaml 3.090 0.31 118 87.4 MiB 1.86 MiB
Pascal 3.110 0.22 205 32.2 MiB 548.3 KiB
PHP 3.198 — 127 179.2 MiB —
Python (PyPy3) 3.297 — 127 376.5 MiB —
Python (Python3) 60.688 — 127 153.1 MiB —

Recursive Fibonacci

Language Execution (s) Compile (s) LOC Peak RSS Binary
Nim 0.096 1.44 119 50.0 MiB 52.1 KiB
Fortran 1.682 0.59 233 33.6 MiB 32.5 KiB
C 1.710 0.33 172 33.1 MiB 28.3 KiB
Ada 1.762 0.98 224 34.8 MiB 48.7 KiB
seed 2.979 0.84 218 33.2 MiB 27.8 KiB
Zig 3.074 4.23 180 32.9 MiB 204.0 KiB
Rust 3.082 2.69 142 33.3 MiB 2.04 MiB
D 3.083 3.10 133 97.3 MiB 1.13 MiB
C# 3.323 4.37 129 116.9 MiB 77.1 KiB
Java 3.974 — 127 561.8 MiB —
OCaml 5.235 0.31 118 87.4 MiB 1.86 MiB
Go 5.584 2.83 157 52.9 MiB 1.53 MiB
Pascal 5.709 0.22 205 32.2 MiB 548.3 KiB
JavaScript (Bun) 7.489 — 108 342.8 MiB —
Dart 7.850 1.22 130 69.8 MiB 6.45 MiB
JavaScript (Node) 11.452 — 108 303.2 MiB —
Python (PyPy3) 12.589 — 127 376.5 MiB —
PHP 18.944 — 127 179.2 MiB —
Python (Python3) 113.390 — 127 153.1 MiB —

The Nim result is reported exactly as measured, but its fib(45) time is a strong optimizer-specialization or constant-folding signal. It should not be used as comparative evidence until the workload gains an anti-folding input.

String processing

Language Execution (s) Compile (s) LOC Peak RSS Binary
Zig 1.448 4.23 180 32.9 MiB 204.0 KiB
seed 1.513 0.84 218 33.2 MiB 27.8 KiB
JavaScript (Node) 1.812 — 108 303.2 MiB —
Rust 2.105 2.69 142 33.3 MiB 2.04 MiB
C 2.124 0.33 172 33.1 MiB 28.3 KiB
Nim 2.188 1.44 119 50.0 MiB 52.1 KiB
C# 2.228 4.37 129 116.9 MiB 77.1 KiB
Ada 2.310 0.98 224 34.8 MiB 48.7 KiB
D 2.430 3.10 133 97.3 MiB 1.13 MiB
JavaScript (Bun) 2.742 — 108 342.8 MiB —
Go 2.823 2.83 157 52.9 MiB 1.53 MiB
Fortran 3.405 0.59 233 33.6 MiB 32.5 KiB
Java 4.018 — 127 561.8 MiB —
OCaml 4.093 0.31 118 87.4 MiB 1.86 MiB
Python (PyPy3) 4.896 — 127 376.5 MiB —
Dart 5.871 1.22 130 69.8 MiB 6.45 MiB
PHP 7.251 — 127 179.2 MiB —
Pascal 12.094 0.22 205 32.2 MiB 548.3 KiB
Python (Python3) 38.324 — 127 153.1 MiB —

Mandelbrot

Language Execution (s) Compile (s) LOC Peak RSS Binary
Nim 1.855 1.44 119 50.0 MiB 52.1 KiB
Go 1.911 2.83 157 52.9 MiB 1.53 MiB
Fortran 2.028 0.59 233 33.6 MiB 32.5 KiB
Ada 2.036 0.98 224 34.8 MiB 48.7 KiB
C 2.103 0.33 172 33.1 MiB 28.3 KiB
D 2.116 3.10 133 97.3 MiB 1.13 MiB
Rust 2.116 2.69 142 33.3 MiB 2.04 MiB
seed 2.119 0.84 218 33.2 MiB 27.8 KiB
Zig 2.119 4.23 180 32.9 MiB 204.0 KiB
C# 2.120 4.37 129 116.9 MiB 77.1 KiB
Dart 2.166 1.22 130 69.8 MiB 6.45 MiB
Java 2.166 — 127 561.8 MiB —
JavaScript (Node) 2.167 — 108 303.2 MiB —
OCaml 2.173 0.31 118 87.4 MiB 1.86 MiB
JavaScript (Bun) 2.177 — 108 342.8 MiB —
Pascal 2.179 0.22 205 32.2 MiB 548.3 KiB
Python (PyPy3) 2.280 — 127 376.5 MiB —
PHP 5.994 — 127 179.2 MiB —
Python (Python3) 73.626 — 127 153.1 MiB —

Binary trees

Language Execution (s) Compile (s) LOC Peak RSS Binary
Java 0.550 — 127 561.8 MiB —
OCaml 0.924 0.31 118 87.4 MiB 1.86 MiB
JavaScript (Bun) 0.930 — 108 342.8 MiB —
Nim 0.939 1.44 119 50.0 MiB 52.1 KiB
Dart 0.959 1.22 130 69.8 MiB 6.45 MiB
C# 1.121 4.37 129 116.9 MiB 77.1 KiB
JavaScript (Node) 1.223 — 108 303.2 MiB —
seed 1.263 0.84 218 33.2 MiB 27.8 KiB
Pascal 1.560 0.22 205 32.2 MiB 548.3 KiB
Fortran 1.600 0.59 233 33.6 MiB 32.5 KiB
C 1.626 0.33 172 33.1 MiB 28.3 KiB
Ada 1.795 0.98 224 34.8 MiB 48.7 KiB
Zig 1.943 4.23 180 32.9 MiB 204.0 KiB
Go 1.951 2.83 157 52.9 MiB 1.53 MiB
Rust 2.233 2.69 142 33.3 MiB 2.04 MiB
D 3.352 3.10 133 97.3 MiB 1.13 MiB
Python (PyPy3) 5.801 — 127 376.5 MiB —
PHP 6.796 — 127 179.2 MiB —
Python (Python3) 16.851 — 127 153.1 MiB —

Complete suite

The complete-suite time is the sum reported by each implementation for all five workloads. It is included as an overview; the workload tables above remain the primary comparison.

Language Execution (s) Compile (s) LOC Peak RSS Binary
Nim 7.698 1.44 119 50.0 MiB 52.1 KiB
C 10.171 0.33 172 33.1 MiB 28.3 KiB
seed 10.496 0.84 218 33.2 MiB 27.8 KiB
Ada 10.521 0.98 224 34.8 MiB 48.7 KiB
Zig 11.194 4.23 180 32.9 MiB 204.0 KiB
Fortran 11.331 0.59 233 33.6 MiB 32.5 KiB
C# 11.424 4.37 129 116.9 MiB 77.1 KiB
Rust 12.146 2.69 142 33.3 MiB 2.04 MiB
Java 13.331 — 127 561.8 MiB —
D 13.595 3.10 133 97.3 MiB 1.13 MiB
Go 15.322 2.83 157 52.9 MiB 1.53 MiB
OCaml 15.515 0.31 118 87.4 MiB 1.86 MiB
JavaScript (Bun) 15.989 — 108 342.8 MiB —
JavaScript (Node) 19.319 — 108 303.2 MiB —
Dart 19.752 1.22 130 69.8 MiB 6.45 MiB
Pascal 24.652 0.22 205 32.2 MiB 548.3 KiB
Python (PyPy3) 28.863 — 127 376.5 MiB —
PHP 42.224 — 127 179.2 MiB —
Python (Python3) 302.933 — 127 153.1 MiB —

The seed corpus file was rewritten afterwards (2026-10-15) in the current surface idiom (if let/while let, [0 as usize; 32], text.split_ascii + SplitToken.slice, early return, expr; statements), which changes the seed row only: 173 loc, and on the same Ryzen 9 5900X host a re-run measured 8.384s complete-suite time, 0.76s compile, 58.3 KiB binary, 33.0 MiB peak RSS with unchanged checksums. A C++ entry (g++ -std=c++23 -O3 -march=native -flto) was added to the harness in the same change and measured 7.605s, 159 loc, 1.44s compile, 53.8 KiB, 35.7 MiB on that host. Both are single-run observations on a non-isolated machine; the tables above remain the 2026-07-12 snapshot they describe.

Reproduction

The complete run used:

cd benchLANG
./run_benchmarks.sh --runs 1 --timeout 600

Local toolchain cache fixes were followed by targeted reruns for Zig, Go, Nim, C#, and Dart. The tables merge only the latest successful result for each language.