2 ms·
Great links, thanks. I sometimes noodle with a faster printf for Java, mostly for giggles. I also found these: Dragon4 and Grisu3: Algoritms to Display Floatin
by specialist 11y ago
Great links, thanks. I sometimes noodle with a faster printf for Java, mostly for giggles. I also found these:
Dragon4 and Grisu3: Algoritms to Display Floating Point Numbers
https://www.clarusft.com/dragon4-and-grisu3-algorithms-to-display-floating-point-numbers/ https://www.clarusft.com/dragon4-and-grisu3-algorithms-to-di...
"Printing Floating-Point Numbers Quickly and Accurately with Integers" by Florian Loitsch
http://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf http://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/pr...
And its implementation in C
https://github.com/google/double-conversion https://github.com/google/double-conversion
Here's a Java implementation of Grisu2 algorithm.
https://github.com/jnordwick/zerog-grisu https://github.com/jnordwick/zerog-grisu