The Rust programming language team has rolled out version 1.98, bringing significant performance improvements for floating-point operations and enhanced integer formatting. This update also solidifies several standard library APIs, promising more reliable and efficient development for Rustaceans.
Algebraic Floating-Point for Enhanced Performance
A major highlight of Rust 1.98 is the introduction of “algebraic floating-point” methods for f32 and f64 types. These new methods, including algebraic_add, algebraic_sub, algebraic_mul, algebraic_div, and algebraic_rem, address a long-standing limitation in traditional IEEE 754 floating-point arithmetic. Due to the non-associative nature of floating-point addition under the IEEE 754 standard, compilers often cannot reorder operations, hindering optimization. This could lead to performance discrepancies, such as Rust being up to eight times slower than C++ in specific dot product calculations.
The new algebraic methods provide developers with the ability to explicitly inform the compiler within specific code blocks that the operations can adhere to the algebraic properties of real numbers. This allows for more aggressive reordering and parallelization, significantly boosting loop vectorization (SIMD) capabilities and overall numerical computation efficiency without introducing undefined behavior (UB).
Faster Integer Formatting with format_into
Rust 1.98.0 also introduces a new format_into method for all native integer types. This method formats integers directly into a pre-allocated buffer, bypassing traditional dynamic dispatch. The efficiency of this new approach is comparable to popular libraries like itoa, dramatically reducing performance overhead associated with integer-to-string conversions.
Alongside format_into, the NumBuffer type has been stabilized, further refining the handling of numerical data within the standard library.
API Stabilizations and Documentation Updates
Beyond performance gains, Rust 1.98 includes important API stabilizations. The official documentation for ManuallyDrop has been updated to provide long-term stability guarantees regarding its interaction with Box. Specifically, operations involving moving a ManuallyDrop wrapper after explicitly dropping the inner Box are now guaranteed to be free from undefined behavior in future Rust versions.
This release demonstrates the Rust team’s continued commitment to refining the language’s performance, safety, and developer experience. The introduction of algebraic floating-point methods is a particularly significant step for numerical computing, while the enhanced integer formatting and API stabilizations contribute to a more robust and efficient Rust ecosystem.









