Measured over 42 equivalent programs

How fast is Salam?

Salam programs compile straight to machine code, with no virtual machine and no garbage collector. The result is that Salam runs level with the fastest languages around and tens of times faster than interpreted ones like Python and PHP.

70xfaster than Python
13xfaster than PHP
44%faster than Go
23%faster than C++
13%faster than C
13%faster than Rust

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
Go1.4 seconds
PHP13.4 seconds
Python70 seconds

Alongside the fastest languages

Mean run time over the 42 programs for each language; a shorter bar is faster.

Salam14.27 ms
Rust16.08 ms
C16.14 ms
C++17.62 ms
Go20.56 ms

PHP at 192 ms and Python at 998 ms are too far behind to fit on this chart.

Where Salam comes out ahead

Salam was the fastest language, or tied with it, in 24 of the 42 programs, more than any other language: C managed 19 and Rust 15. A few of them:

6x

Tensor multiply

Salam 9 ms against 54 ms for C, the nearest rival; Rust 93 ms and Go 68 ms.

3.4x

Matrix multiply

Salam 16 ms against 54 ms for C; Rust 94 ms and Go 67 ms.

1.5x

Game of life

Salam 11 ms against 12 ms for C; Rust and Go 39 ms and 50 ms.

Salam in the real world

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

Forty-two programs (numeric work, primes, sorting, strings, matrices, tensors and more) were implemented the same way in C, C++, Rust, Go, Python, PHP and Salam, and every language's output was compared before timing to make sure they agreed. For each program the fastest run was recorded, and for each language the geometric mean of those times was taken; C and C++ were built at the highest optimisation level (O3). The Salam numbers on this page come from the LLVM backend at O3, so that the comparison with C and Rust is fair; plain salam build with no options uses tcc with no optimiser and averages 16.32 ms.

CPUAMD EPYC 7763 64-Core
Compilers and interpretersgcc 15.2 · Rust 1.96.1 · Go 1.26.8 · Python 3.14.8 · PHP 8.5.11 · Salam 0.4.9
Programs42 per language

The benchmark programs and the full result data are on GitHub, and anyone can rerun them.

The speed of C, in a language you can read

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