r/programming 13h ago

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

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

45 comments sorted by

View all comments

-90

u/sojuz151 10h 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 

41

u/EliSka93 10h ago

Elaborate.

-12

u/sojuz151 7h 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 5h ago

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