Rust's new API makes floating point math 4x faster

Faster floating point math with Rust's new API

Rust's new API makes floating point math 4x faster

Rust 1.98 introduces algebraic operators that let the compiler optimize floating point math aggressively, while keeping strict operations for precision-critical code. By using these operators in a pairwise summation algorithm, you can match NumPy's speed and accuracy, and even beat it. The new API also enables SIMD instructions, cutting CPU instructions per value dramatically.

Using algebraic operations enables the compiler to generate code that runs twice as fast on my computer.

More from this day

2026-08-11