zasm performance

zasm is a typed SSA language whose checker proves memory safety and data-race freedom, so compiled code carries no runtime checks. Here it is measured against Rust and C on 13 programs, each written with the same algorithm and data layout in all three languages.

zasm's run time over Rust's, the geometric mean of 12 like-for-like programs (release builds, same LLVM). 1.00 is parity; below 1.00 zasm is faster.

Release builds, program by program

zasm's run time divided by each other build's. Left of the parity line zasm is faster. Log scale. Rust is rustc -C opt-level=3 -C target-cpu=native; C is -O3 -march=native -ffp-contract=off.

Table: run times in seconds

Development builds

The fast-to-compile builds against each other: zasm's Cranelift backend, rustc -C opt-level=0 and clang -O0. How many times longer the other binary runs than zasm's; right of the parity line zasm is faster. Log scale.

Table: run times in seconds

Compile time

Whole build including linking, geometric mean over the 13 programs, in milliseconds.

Development builds

Release builds

Table: compile times in milliseconds

How to read this

Method