Ahead
Edit distance 4.5 vs 7.8 (C), game of life 7.2 vs 9.1 (C), sqrt decomposition 8.1 vs 9.8 (Rust), subset sum 8.5 vs 10.3 (C), longest increasing subsequence 9.7 vs 10.8 (C), heap sort 26.2 vs 28.1 (C).
Salam compiles straight to machine code, with no virtual machine and no garbage collector. On the 39 programs that use the same algorithm in every language, Salam averaged 10.6 ms, C 11.7 ms and Rust 11.3 ms: the same range, with small gaps either way. Against the fastest of C, C++, Rust and Go on each program, Salam was ahead on 6, level on 27 and behind on 6. Interpreted languages are another story: Python took 56 times as long and PHP 9.6 times.
If Salam does a piece of work in one second, this is how long the same work takes elsewhere:
Geometric mean of each program's fastest run, over the 39 programs that use the same algorithm everywhere; a shorter bar is faster. Gaps of a few percent are within run-to-run noise.
A program counts as level when Salam is within 5% (or half a millisecond) of the fastest of C, C++, Rust and Go, because gaps that small change from run to run. On the 39 same-algorithm programs (times in ms):
Edit distance 4.5 vs 7.8 (C), game of life 7.2 vs 9.1 (C), sqrt decomposition 8.1 vs 9.8 (Rust), subset sum 8.5 vs 10.3 (C), longest increasing subsequence 9.7 vs 10.8 (C), heap sort 26.2 vs 28.1 (C).
Iterative Fibonacci, primes, the sieve, quicksort and merge sort, Mandelbrot, matrix multiply, string work and more: within noise of the fastest compiled language.
LCG random 19.4 vs 17.9 (C), loop count 5.9 vs 5.3 (C), binary search 667.7 vs 583.9 (Rust), n-queens 41.1 vs 35.7 (C), recursive Fibonacci 3.1 vs 2.4 (C), printing a line a million times 8.2 vs 2.6 (Rust).
Fastest of 10 runs, in milliseconds. Bold marks the fastest compiled language on each row.
| Program | C | C++ | Rust | Go | Salam | PHP | Python |
|---|---|---|---|---|---|---|---|
01_fib_recursive | 2.4 | 3.0 | 3.1 | 4.9 | 3.1 | 37.1 | 60.2 |
02_fib_iterative | 15.2 | 17.0 | 15.9 | 17.1 | 15.1 | 39.0 | 415.8 |
03_primes_count | 3.8 | 4.7 | 3.7 | 4.8 | 3.7 | 15.7 | 107.5 |
04_collatz | 4.4 | 5.1 | 3.8 | 6.1 | 3.7 | 42.2 | 245.7 |
05_sum_mod | 9.9 | 10.9 | 10.3 | 10.3 | 9.5 | 23.8 | 254.2 |
06_gcd_sum | 14.9 | 16.1 | 13.0 | 16.0 | 13.5 | 34.2 | 95.3 |
07_pow_mod | 2.4 | 3.1 | 2.7 | 3.9 | 2.4 | 18.9 | 52.2 |
08_digit_sum | 3.5 | 4.5 | 3.8 | 4.5 | 3.7 | 47.2 | 278.2 |
09_perfect_numbers | 8.9 | 10.0 | 7.7 | 10.6 | 7.6 | 31.1 | 303.9 |
10_pi_leibniz | 4.9 | 5.8 | 5.1 | 5.7 | 4.9 | 40.8 | 388.4 |
11_loop_count | 5.3 | 6.3 | 5.5 | 6.2 | 5.9 | 13.4 | 88.1 |
12_hello_print | 17.7 | 15.6 | 2.6 | 6.0 | 8.2 | 376.3 | 75.8 |
13_array_rw | 21.3 | 22.5 | 22.2 | 22.4 | 21.9 | 59.7 | 709.1 |
14_lcg_random | 17.9 | 19.0 | 19.4 | 23.3 | 19.4 | 60.4 | 1,048.3 |
15_matrix_mult | 6.1 | 6.9 | 4.6 | 7.6 | 4.8 | 130.3 | 837.4 |
16_quicksort | 25.6 | 26.2 | 25.0 | 25.5 | 24.9 | 132.8 | 463.2 |
17_n_queens | 35.7 | 37.8 | 38.4 | 39.8 | 41.1 | 317.9 | 518.4 |
18_sieve_eratosthenes | 4.8 | 5.6 | 4.8 | 5.6 | 4.9 | 113.2 | 648.5 |
19_mandelbrot | 8.6 | 9.5 | 8.8 | 9.6 | 8.7 | 75.7 | 843.0 |
20_monte_carlo_pi | 22.9 | 23.4 | 12.4 | 27.8 | 12.4 | 204.7 | 2,585.9 |
21_coin_change_dp | 2.6 | 3.3 | 2.7 | 3.1 | 2.6 | 14.0 | 76.9 |
22_knapsack_01 | 3.4 | 4.1 | 3.7 | 5.4 | 3.5 | 76.9 | 887.8 |
23_caesar_cipher | 10.5 | 11.6 | 10.4 | 13.7 | 10.4 | 61.1 | 768.2 |
24_merge_sort | 23.9 | 24.8 | 24.9 | 29.3 | 25.1 | 182.9 | 567.3 |
25_palindrome_count | 9.2 | 10.2 | 9.3 | 11.9 | 8.8 | 171.7 | 1,107.4 |
26_ackermann | 1.5 | 2.1 | 1.7 | 2.4 | 1.6 | 8.5 | 21.0 |
27_edit_distance | 7.8 | 8.3 | 8.4 | 9.7 | 4.5 | 153.4 | 1,572.8 |
28_prime_factorization | 813.6 | 836.0 | 701.4 | 801.0 | 704.8 | 2,989.4 | 35,373.0 |
29_dot_product | 29.4 | 30.6 | 29.9 | 31.0 | 29.7 | 147.6 | 1,801.6 |
30_heap_sort | 28.1 | 28.1 | 29.4 | 35.9 | 26.2 | 306.7 | 689.9 |
31_binary_search_stress | 730.6 | 724.2 | 583.9 | 733.5 | 667.7 | 4,589.4 | 26,119.9 |
32_longest_increasing_subsequence | 10.8 | 12.1 | 12.2 | 12.8 | 9.7 | 202.3 | 1,918.7 |
33_subset_sum_reachability | 10.3 | 11.9 | 18.6 | 14.1 | 8.5 | 234.8 | 1,826.5 |
34_counting_sort | 32.8 | 34.2 | 23.5 | 35.4 | 24.2 | 182.6 | 1,952.9 |
35_run_length_stats | 7.2 | 7.4 | 5.7 | 7.8 | 5.5 | 84.7 | 640.7 |
36_array_rotation_reversal | 19.9 | 21.5 | 19.9 | 21.8 | 19.2 | 159.5 | 705.9 |
37_sqrt_decomposition | 10.8 | 12.4 | 9.8 | 16.0 | 8.1 | 247.7 | 893.8 |
38_game_of_life | 9.1 | 10.3 | 24.6 | 33.2 | 7.2 | 975.8 | 6,722.1 |
39_trapezoidal_integration | 11.7 | 14.3 | 11.3 | 14.4 | 11.3 | 292.1 | 2,201.8 |
40_matrix_stdlib_matmul | 42.5 | 43.8 | 64.3 | 47.2 | 14.3 | 995.4 | 121.8 |
41_matrix_stdlib_smallops | 4.1 | 5.0 | 5.2 | 15.9 | 36.4 | 375.9 | 1,174.4 |
42_tensor_stdlib_matmul | 40.3 | 38.1 | 55.7 | 43.0 | 7.3 | 859.6 | 119.1 |
Not every server people reach for is written in a compiled language. Nine servers answered the same eleven routes on the same machine, in one interleaved run, each route measured on every server back to back: Salam's own net.http, Go's standard library router, three of the most popular Go frameworks (Fiber, Gin, Echo), nginx, Apache, Node (Express 5), and PHP's built-in server.
Geometric mean requests/second over all 11 routes; a longer bar is faster. nginx and Apache don't implement 4 of the 11 routes (see the method note below), so they get their own comparison next.
nginx answers 7 of the 11 routes straight from its config or the file system: /plaintext, /json, /cached, /file, /users/:id, /static and /. This is the geometric mean over those 7 for every server that answers all of them. Apache is left out because it can't capture the /users/:id segment.
The full eleven-route table is linked below so no one has to take a headline number on faith. Three rows worth reading:
Salam 99,143 req/s on /search against Fiber's 48,247, the next best; Go's own net/http manages 33,193.
Salam keeps static files in memory after the first request; nginx here opens the file on every request (no open_file_cache). So this row measures caching as much as the server: Salam 79,775 req/s, Fiber 73,797, nginx 35,831.
On / Salam's 91,136 req/s is only 4% ahead of Fiber's 87,651. Said plainly, not hidden in an average.
| Date | 28 October 2026 |
|---|---|
| Machine | A shared 6-vCPU AMD EPYC sandbox, with a load average around 11 from unrelated work |
| Cores | Servers pinned to 4 cores, the load generator to the other 2 |
| Load | 64 keep-alive connections on 2 threads, 10 s per route after a 3 s warm-up, routes interleaved across all servers |
| Salam | main with the epoll worker pool (#2473), LLVM backend, built with the 0.5.9 compiler |
| Fiber | v2.52.16 on Go 1.26.0, default configuration (no prefork) |
| nginx | 1.28.3, 4 workers, access_log off, sendfile on, no open_file_cache |
| Others | Gin v1.12.0 · Echo v4.16.2 · Apache 2.4.66 · Node 24.19.0 + Express 5.3.0 · PHP 8.5.4 |
Speed is not only a benchmark story. Salam already runs real software.
Services built with Salam comfortably serve more than 150,000 users, and do it on a single small server.
An operating system has been written entirely in Salam, so the language is ready for the lowest layers of a software stack.
The compiler is written in Salam and nothing else: more than 200 Salam source files that compile Salam.
The program that builds this site, the benchmark harness behind this page and the Salam code formatter are all written in Salam.
Each of the 42 programs was written in C, C++, Rust, Go, Python, PHP and Salam with the same algorithm, and every version's output was checked against C's before timing. Each program ran 10 times after one untimed warm-up and the fastest run was kept; the averages are geometric means of those times. C and C++ were built with gcc -O3, Rust with -C opt-level=3, and Salam with its LLVM backend at -O3. Plain salam build with no options uses tcc without an optimiser and averaged 11.0 ms on the same 39 programs.
| Date | 27 October 2026, commit 8cfe206 |
|---|---|
| Machine | GitHub Actions ubuntu-24.04 runner (a shared cloud VM), AMD EPYC 9V45, inside an Alpine Linux Docker image |
| Compilers and interpreters | gcc 15.2.0 · rustc 1.96.1 · Go 1.26.10 · Python 3.14.10 · PHP 8.5.12 · Salam 0.6.0 (dev) |
| Runs | 10 timed runs per program after one warm-up; the fastest is kept |
| Programs | 42 per language; 39 in the averages |
Install Salam, or try it in your browser right now.