Rust 1.98 Algebraic Floats Fix the 8x C++ Speed Gap Rust 1.98, released on August 20, introduces algebraic floating-point methods that address a performance gap where Rust dot products ran 8x slower than C++ on x86_64 CPUs, allowing per-operation reordering for vectorization without undefined behavior. The release also adds format_into and NumBuffer for zero-heap integer formatting, plus String::from_utf16le/from_utf16be and other stabilizations. Rust 1.98 landed on August 20 with a headline feature the previews missed: algebraic floating-point methods that directly address the long-standing gap where Rust dot products ran 8x slower than C++ on x86 64 CPUs. If you write numerical, audio, graphics, or ML inference code in Rust, this is the release you have been waiting for. Run rustup update stable and read on. The Float Problem: Why Rust Was Losing to C++ In 2025, a GitHub issue https://github.com/rust-lang/libs-team/issues/532 demonstrated that a simple Rust dot-product loop ran 8x slower than the equivalent C++ on modern x86 64 hardware. The culprit was not Rust’s optimizer — it was correctness. Rust strictly follows IEEE 754, which mandates that floating-point additions execute left to right. That means a + b + c + d must be evaluated as a + b + c + d , one operation at a time. C++ with -O3 relaxes that constraint and lets the compiler reorder operations into a + b + c + d , which maps directly to SIMD parallel execution. That is where the 8x gap came from. The previous Rust workaround — fadd fast intrinsics — assumed all inputs were finite, causing undefined behavior if a NaN or infinity appeared. Not exactly production-safe. Algebraic Methods: Opt-In Performance, No Undefined Behavior Rust 1.98 adds five new methods to both f32 and f64 : algebraic add , algebraic sub , algebraic mul , algebraic div , and algebraic rem . They signal to the compiler that it may reorder these specific operations for better vectorization. Results may differ slightly from strict IEEE sequential execution — but they are never undefined behavior. The compiler picks valid floating-point values, not garbage. Here is what a vectorization-friendly dot product looks like in Rust 1.98: php fn dot a: & f32 , b: & f32 - f32 { a.iter .zip b .fold 0.0 f32, |acc, x, y | { acc.algebraic add x.algebraic mul y } } That is the entire change. The compiler now has permission to generate vectorized code for this loop. Performance gains depend on your workload — simple accumulations can approach the C++ baseline, and numerical kernels previously bottlenecked on sequential float ops should see meaningful improvements. This is a more surgical design than C++’s -ffast-math , which applies to every float operation in the compilation unit — you cannot opt specific hot loops in while leaving the rest IEEE-compliant. Rust’s algebraic methods are per-operation, giving you precise control. Python Speed’s breakdown https://pythonspeed.com/articles/faster-float-math-rust/ walks through the performance implications in detail. format into: Remove itoa from Your Cargo.toml The second headline addition is format into on all primitive integer types, paired with the new NumBuffer type. It is a stack-allocated, zero-heap, zero-dynamic-dispatch way to turn integers into string slices: js let mut buf = NumBuffer::