Analysis

Rust decimal benchmark shows micro wins, but 71x workflow loss

fixed_num won 8 of 24 microbench groups, then lost the full workflow by 71x, turning decimal speed tests into a warning for Rust developers.

Jamie Taylor··2 min read
Published
Listen to this article0:00 min
Rust decimal benchmark shows micro wins, but 71x workflow loss
AI-generated illustration

A decimal crate can look sharp in a tight loop and still get crushed the moment parsing, formatting, and application flow enter the picture. That is the lesson Rust developers got from a May 28, 2026 benchmark post that showed fixed_num winning 8 of 24 individual benchmark groups, then losing the end-to-end workflow by 71x.

The post focused on ancdec, a no_std fixed-point decimal library with split integer and fractional storage, and compared it against several commonly recommended Rust decimal crates. The benchmark covered add, sub, mul, div, cmp, and parse, which made the result harder to dismiss as a one-off arithmetic anomaly. The headline was clear enough to sting: microbenchmarks favored fixed_num in several isolated cases, but the full pipeline told a very different story.

That gap is exactly why the post landed so forcefully in Rust circles. A crate that wins on a single arithmetic kernel can still lose once the workload includes user input, output serialization, and the movement of values through larger transaction logic. In other words, the wrong benchmark can make a slow path look fast and a practical choice look worse than it is.

AncDec itself had already sparked debate. A March 6, 2026 announcement described it as an anchored-decimal type with independent 19-digit integer and 19-digit fractional parts, and commenters pushed on the design tradeoffs, especially whether that representation would make scale changes and operations like multiplication by 10 more expensive than expected. That same discussion set up the later benchmark work, which kept the focus on how decimal design choices show up under load.

The broader context in the Rust ecosystem made the result feel even less isolated. A February 6, 2026 forum post had already benchmarked rust_decimal against primitive_fixed_point_decimal, and This Week in Rust 638, published on February 11, highlighted that benchmark alongside other community performance updates. Decimal performance was already an active topic, and the May post pushed the argument from isolated ops into realistic workflow cost.

The crate docs help explain why the debate keeps returning. rust_decimal describes itself as a pure-Rust implementation for financial calculations, built around a 96-bit integer, a scale, and a sign bit. Ancdec’s docs describe four types for different precision and size needs, while fixed_num’s Dec19x19 design is presented as a fixed-size decimal with large range and very fine precision. Those models are not interchangeable, and the benchmark makes that plain.

For Rust developers picking a decimal type, the warning is simple: do not stop at the fastest add or parse number. The 71x workflow loss shows how quickly benchmark bragging rights can evaporate once the full path is measured.

This article was produced by Prism’s automated news system from verified source data, official records, and press releases, then run through automated quality and moderation checks before publishing. The system is built and supervised by the people who set the standards it runs under. Read our full AI policy.

Did this article answer your question?

Discussion

More Rust Programming News