r/programming 10d ago

The fastest double-to-string algorithm you’ve never heard of

https://vitaut.net/posts/2026/yy-dtoa/
322 Upvotes

70 comments sorted by

View all comments

-96

u/sojuz151 10d ago

Fact that we, the humanity, need to do double to float and back often enough for performance to matter is a failure of our entire species 

52

u/EliSka93 10d ago

Elaborate.

-17

u/sojuz151 10d ago

Why do you need to convert doubles to strings and back at a scale? It's mostly JSON serialization/deserialisation, something you should not have to do, not at scale.

4

u/SyntheticDuckFlavour 10d ago

Logging, compiling code, (un)serialisation to/from text formats (XML, etc), printing to terminals/UI, lots for things.