Skip to content

Conversation

austinderek
Copy link

Dragonbox is a faster ftoa algorithm that provides the same guarantees
as Ryu: round-trip conversion, shortest length, and correct rounding.
The author of the reference implementation has agreed to distribute
this file under Go's BSD-style license.

The new implementation has been fuzz-tested against the current
Ryu implementation in addition to the existing test suite.
Benchmarks show at least ~15-20% performance improvement.
Benchmarks and fuzz-testing code are available at:
https://github.com/taichimaeda/dragonbox-bench/

Dragonbox only supports shortest-precision conversion, so we continue to
use Ryu-printf for fixed precision.

Fixes golang#74886


🔄 This is a mirror of upstream PR golang#75195

@austinderek austinderek force-pushed the master branch 2 times, most recently from d50240b to 8bcda6c Compare August 30, 2025 09:01
@austinderek austinderek force-pushed the master branch 22 times, most recently from d50240b to 8bcda6c Compare August 30, 2025 20:01
@austinderek austinderek force-pushed the master branch 4 times, most recently from 6a08e80 to 70b640f Compare August 31, 2025 14:02
@austinderek austinderek force-pushed the master branch 30 times, most recently from 2a71af1 to 5bf50a0 Compare October 4, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants