Measured on 42 equivalent programs, 27 October 2026

How fast is Salam?

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.

56xfaster than Python
9.6xfaster than PHP
1.3xfaster than Go
10.6 / 11.7ms, Salam / C, average over 39 programs
10.6 / 11.3ms, Salam / Rust, the same 39 programs
6 · 27 · 6programs ahead, level and behind the fastest compiled language

One second of Salam, in other languages

If Salam does a piece of work in one second, this is how long the same work takes elsewhere:

Salam1 second
Rust1.06 seconds
C1.1 seconds
Go1.3 seconds
PHP9.6 seconds
Python56 seconds

Alongside the fastest languages

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.

Salam10.63 ms
Rust11.29 ms
C11.68 ms
C++13.06 ms
Go14.23 ms

PHP (102 ms) and Python (598 ms) are too far behind to fit. With all 42 programs the order is the same: Salam 10.93 ms, Rust 12.00, C 12.10, C++ 13.47, Go 15.07.

Ahead, level and behind

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):

6

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).

27

Level

Iterative Fibonacci, primes, the sieve, quicksort and merge sort, Mandelbrot, matrix multiply, string work and more: within noise of the fastest compiled language.

6

Behind

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).

What these numbers do not show

  • Most programs finish in 2 to 30 ms (the median C time is 10.5 ms), so process start-up is part of every time and a millisecond is a large share. One sign of it: Salam built with tcc and no optimiser still averages 11.0 ms, close to the optimised build. The suite separates compiled languages from interpreted ones clearly; between compiled languages, read it as the same range, not as a ranking.
  • Each time is the fastest of 10 runs on a shared GitHub Actions virtual machine. Gaps under about 5% can flip on the next run.
  • Three programs (40 to 42) use Salam's own matrix and tensor library while C, C++, Rust and Go use hand-written loops, so they compare libraries, not compilers, and are left out of the averages above. Salam is ahead on two (14.3 ms vs 42.5 ms for C, and 7.3 ms vs 38.1 ms for C++) and far behind on the third (36.4 ms vs 4.1 ms for C, where gcc removes most of the loop work).
  • Every language implements the same algorithm with the same output, written the way that language is normally written. These are small programs; they do not measure large applications, memory-heavy workloads or how long a big project takes to build.

Every program, every number

Fastest of 10 runs, in milliseconds. Bold marks the fastest compiled language on each row.

Show the table of all 42 programs

ProgramCC++RustGoSalamPHPPython
01_fib_recursive2.43.03.14.93.137.160.2
02_fib_iterative15.217.015.917.115.139.0415.8
03_primes_count3.84.73.74.83.715.7107.5
04_collatz4.45.13.86.13.742.2245.7
05_sum_mod9.910.910.310.39.523.8254.2
06_gcd_sum14.916.113.016.013.534.295.3
07_pow_mod2.43.12.73.92.418.952.2
08_digit_sum3.54.53.84.53.747.2278.2
09_perfect_numbers8.910.07.710.67.631.1303.9
10_pi_leibniz4.95.85.15.74.940.8388.4
11_loop_count5.36.35.56.25.913.488.1
12_hello_print17.715.62.66.08.2376.375.8
13_array_rw21.322.522.222.421.959.7709.1
14_lcg_random17.919.019.423.319.460.41,048.3
15_matrix_mult6.16.94.67.64.8130.3837.4
16_quicksort25.626.225.025.524.9132.8463.2
17_n_queens35.737.838.439.841.1317.9518.4
18_sieve_eratosthenes4.85.64.85.64.9113.2648.5
19_mandelbrot8.69.58.89.68.775.7843.0
20_monte_carlo_pi22.923.412.427.812.4204.72,585.9
21_coin_change_dp2.63.32.73.12.614.076.9
22_knapsack_013.44.13.75.43.576.9887.8
23_caesar_cipher10.511.610.413.710.461.1768.2
24_merge_sort23.924.824.929.325.1182.9567.3
25_palindrome_count9.210.29.311.98.8171.71,107.4
26_ackermann1.52.11.72.41.68.521.0
27_edit_distance7.88.38.49.74.5153.41,572.8
28_prime_factorization813.6836.0701.4801.0704.82,989.435,373.0
29_dot_product29.430.629.931.029.7147.61,801.6
30_heap_sort28.128.129.435.926.2306.7689.9
31_binary_search_stress730.6724.2583.9733.5667.74,589.426,119.9
32_longest_increasing_subsequence10.812.112.212.89.7202.31,918.7
33_subset_sum_reachability10.311.918.614.18.5234.81,826.5
34_counting_sort32.834.223.535.424.2182.61,952.9
35_run_length_stats7.27.45.77.85.584.7640.7
36_array_rotation_reversal19.921.519.921.819.2159.5705.9
37_sqrt_decomposition10.812.49.816.08.1247.7893.8
38_game_of_life9.110.324.633.27.2975.86,722.1
39_trapezoidal_integration11.714.311.314.411.3292.12,201.8
40_matrix_stdlib_matmul42.543.864.347.214.3995.4121.8
41_matrix_stdlib_smallops4.15.05.215.936.4375.91,174.4
42_tensor_stdlib_matmul40.338.155.743.07.3859.6119.1
A second benchmark: the HTTP router

How fast is Salam's web server?

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.

11 of 11routes where Salam answered more requests per second than Fiber
16% to 52%ahead of Fiber on the geometric mean: 16% on a quiet machine, 52% in the full run under load
2.7xfaster than Go's own net/http
4.2xfaster than Node/Express

Across every application server tested

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.

Salam94,850 req/s
Go, Fiber62,493 req/s
Go, Echo35,238 req/s
Go, Gin34,999 req/s
Go, net/http34,987 req/s
node/express22,536 req/s
php -S11,992 req/s

On the routes nginx serves itself

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.

Salam94,156 req/s
Go, Fiber69,653 req/s
nginx60,490 req/s
Go, Gin39,217 req/s
Go, Echo37,644 req/s
Go, net/http36,202 req/s
node/express21,585 req/s
php -S12,029 req/s

Where the gap is widest, and where it isn't

The full eleven-route table is linked below so no one has to take a headline number on faith. Three rows worth reading:

+105%

Query parsing + list building

Salam 99,143 req/s on /search against Fiber's 48,247, the next best; Go's own net/http manages 33,193.

Caching

Static files

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.

+4%

Where the margin is thin

On / Salam's 91,136 req/s is only 4% ahead of Fiber's 87,651. Said plainly, not hidden in an average.

How this test was run

Date28 October 2026
MachineA shared 6-vCPU AMD EPYC sandbox, with a load average around 11 from unrelated work
CoresServers pinned to 4 cores, the load generator to the other 2
Load64 keep-alive connections on 2 threads, 10 s per route after a 3 s warm-up, routes interleaved across all servers
Salammain with the epoll worker pool (#2473), LLVM backend, built with the 0.5.9 compiler
Fiberv2.52.16 on Go 1.26.0, default configuration (no prefork)
nginx1.28.3, 4 workers, access_log off, sendfile on, no open_file_cache
OthersGin v1.12.0 · Echo v4.16.2 · Apache 2.4.66 · Node 24.19.0 + Express 5.3.0 · PHP 8.5.4

The full per-route table, every server's configuration and the harness itself (with the raw results) are on GitHub in BENCHMARK.md. Every server shared the background load, because each route was measured on all of them back to back, but that load favours servers that keep few threads, Salam's included; that is why both the 16% and the 52% figures are given. Don't compare req/s numbers across the two benchmarks on this page, and rerun it on your own hardware before planning capacity with it.

Built with Salam, from the OS to this very website

Speed is not only a benchmark story. Salam already runs real software.

Over 150,000 users on one small server

Services built with Salam comfortably serve more than 150,000 users, and do it on a single small server.

A whole operating system in Salam

An operating system has been written entirely in Salam, so the language is ready for the lowest layers of a software stack.

Salam is written in Salam

The compiler is written in Salam and nothing else: more than 200 Salam source files that compile Salam.

This website is Salam too

The program that builds this site, the benchmark harness behind this page and the Salam code formatter are all written in Salam.

Method

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.

Date27 October 2026, commit 8cfe206
MachineGitHub Actions ubuntu-24.04 runner (a shared cloud VM), AMD EPYC 9V45, inside an Alpine Linux Docker image
Compilers and interpretersgcc 15.2.0 · rustc 1.96.1 · Go 1.26.10 · Python 3.14.10 · PHP 8.5.12 · Salam 0.6.0 (dev)
Runs10 timed runs per program after one warm-up; the fastest is kept
Programs42 per language; 39 in the averages

The benchmark programs, the full report and the raw time of every single run are on GitHub, and anyone can rerun them.

Compiled speed, in a language you can read

Install Salam, or try it in your browser right now.