Rendered at 01:49:44 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
anykrver 5 hours ago [-]
The “shortest round-trip” requirement is key. If the decimal string is parsed back into a float, you must recover the exact original value. That constraint is what makes the algorithmic problem much harder than just formatting a number.
leni536 1 days ago [-]
zmij[1] is claimed to be significantly faster than all of the tested implementations in the paper. It would have been nice if it was included.
It is three months old, probably created after they submitted for publication.
leni536 1 days ago [-]
Yeah, it's very recent. Unfortunate timing.
boisterousness 19 hours ago [-]
Another contender: Russ Cox's "fast unrounded scaling" [1].
Cox writes: "The main idea of this post is to implement fast unrounded scaling, which computes an approximation to x · 2^e · 10^p, often in a single 64-bit multiplication. On that foundation we can build nearly trivial printing and parsing algorithms that run very fast. In fact, the printing algorithms run faster than all other known algorithms, including Dragon4, Grisu3, Errol3, Ryū, Ryū Printf, Schubfach, and Dragonbox, and the parsing algorithm runs faster than the Eisel-Lemire
algorithm. This post presents both the algorithms and a concrete implementation in Go. I expect some form of this Go code to ship in Go 1.27 (scheduled for August 2026)."
[1] https://github.com/vitaut/zmij
It is three months old, probably created after they submitted for publication.
Cox writes: "The main idea of this post is to implement fast unrounded scaling, which computes an approximation to x · 2^e · 10^p, often in a single 64-bit multiplication. On that foundation we can build nearly trivial printing and parsing algorithms that run very fast. In fact, the printing algorithms run faster than all other known algorithms, including Dragon4, Grisu3, Errol3, Ryū, Ryū Printf, Schubfach, and Dragonbox, and the parsing algorithm runs faster than the Eisel-Lemire algorithm. This post presents both the algorithms and a concrete implementation in Go. I expect some form of this Go code to ship in Go 1.27 (scheduled for August 2026)."
[1] https://research.swtch.com/fp