Tensor multiply
Salam 9 ms against 54 ms for C, the nearest rival; Rust 93 ms and Go 68 ms.
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.
If Salam does a piece of work in one second, this is how long the same work takes elsewhere:
Mean run time over the 42 programs for each language; a shorter bar is faster.
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:
Salam 9 ms against 54 ms for C, the nearest rival; Rust 93 ms and Go 68 ms.
Salam 16 ms against 54 ms for C; Rust 94 ms and Go 67 ms.
Salam 11 ms against 12 ms for C; Rust and Go 39 ms and 50 ms.
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.
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.
| CPU | AMD EPYC 7763 64-Core |
|---|---|
| Compilers and interpreters | gcc 15.2 · Rust 1.96.1 · Go 1.26.8 · Python 3.14.8 · PHP 8.5.11 · Salam 0.4.9 |
| Programs | 42 per language |
Install Salam, or try it in your browser right now.