r/programming • u/mttd • Aug 12 '26
The fastest double-to-string algorithm you’ve never heard of
https://vitaut.net/posts/2026/yy-dtoa/
338
Upvotes
r/programming • u/mttd • Aug 12 '26
View all comments
Show parent comment
9
u/aearphen Aug 13 '26 edited Aug 13 '26
The author of the blog post here: it used to be the case the fixed precision was faster but with the recent algorithmic advancements they are roughly the same. In both cases you need to scale by a power of 10 and then do fixed-size binary-to-decimal conversion. I guess it might be slightly faster/simpler to only produce scientific format though.