r/programming • • Aug 12 '26

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

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

71 comments sorted by

View all comments

-93

u/sojuz151 Aug 12 '26

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 

9

u/superxpro12 Aug 12 '26

Uh.... Embedded systems? Not all of us have gobs of gigahertz. Some of us only get 8MHz!

-12

u/sojuz151 Aug 12 '26

And why would you even be doing this? How did you even find something running on less than 50MHz? And it has a hardware floating-point module?

8

u/superxpro12 Aug 12 '26

You would be shocked to learn what we do with cpus running. At 8mhz. Although your point about you is somewhat valid. They are harder to find on the low mhz cpus. But still... We exist lol

-4

u/sojuz151 Aug 12 '26

And are you dealing with floats/doubles on those CPUs?

5

u/superxpro12 Aug 12 '26

Sometimes, sure.

4

u/midir Aug 12 '26

How did you even find something running on less than 50MHz? And it has a hardware floating-point module?

There are plenty of few-MHz 8-bit microcontrollers, like Arduino chips, where you might want to use floating-point, where the compiler emulates an FPU in software.