Hacker GitHub

← All repos

ulfjack/ryu

View on GitHub ↗ ★ 1,359 C++

Converts floating point numbers to decimal strings

21 mentions on Hacker News by 17 people: 5 stories, 16 comments · first 2018-07-28 · latest 2025-09-12

Mentions per year 21 mentions · busiest year 2018 (7)
20082026
  1. …to do the float->string conversion are quite complicated. Here is a recent pretty good one: https://github.com/ulfjack/ryu I think there's been an even more recent one that is even more efficient than Ryu but I don't remember the name.
    comment by IshKebab · 2025-09-12 · in Float Exposed
  2. …(arbitrarily capped at 18 digits because Ryu didn't need more) [1]: https://github.com/ulfjack/ryu/issues/34
  3. …also uses a novel algorithm which is an order of magnitude quicker for many floating points tasks ( https://github.com/ulfjack/ryu ). If you actually want to learn about this, then watch the video I linked earlier.
  4. There's also the new Ryu algorithm that is being used, which is probably the biggest speed up. https://github.com/ulfjack/ryu
  5. …engineering effort into "Ryu", a parsing library for double-precision floating point numbers: https://github.com/ulfjack/ryu It's not a parsing library, but a printing one, i.e., double -> string. https://github.com/fastfloat/fast_float is…
  6. …engineering effort into "Ryu", a parsing library for double-precision floating point numbers: https://github.com/ulfjack/ryu Why bother, you ask? Why would anyone bother to make floating point number parsing super efficient? JSON.
  7. …know if it ever prints more digits than needed. One recent algorithm for printing floats exactly is https://github.com/ulfjack/ryu , though I'm unaware what's the state-of-the-art ( https://github.com/jk-jeon/dragonbox claims to be a…
    comment by nyanpasu64 · 2022-08-03 · in I still love PHP and JavaScript
  8. …the converse (doubles to strings), is also much faster than using Java's number formatting classes. https://github.com/ulfjack/ryu/blob/master/src/main/java/inf... Aside, my JMathTeX fork uses Ryū to achieve real-time rendering of TeX in…
  9. …fork) [2]: https://bell-sw.com/announcements/2020/11/02/TeXnical-Writin... (my blog series) [3]: https://github.com/ulfjack/ryu [4]: https://github.com/DaveJarvis/JMathTeX/blob/d2d678717505765b...
    comment by thangalin · 2021-02-12 · in SVG: The Good, the Bad and the Ugly
  10. …fastest algorithm at this point: https://dl.acm.org/doi/10.1145/3192366.3192369 (PLDI 2018 paper) https://github.com/ulfjack/ryu (C source code)
  11. …even more recent research into doing this really efficiently, using an algorithm called Ryū. [e] https://github.com/ulfjack/ryu [-4] https://www.youtube.com/watch?v=kw-U6smcLzk [1.73] https://www.youtube.com/watch?v=4P_kbF0EbZM
  12. …as strings into individual SVG documents in under 600 milliseconds on newish hardware. [0]: https://github.com/ulfjack/ryu/blob/master/README.md [1]: https://news.ycombinator.com/item?id=17633182 [2]: https://github.com/DaveJarvis/JMathTeX/…
  13. …Look at Ryu for example. Good luck understanding that without comments or documentation: https://github.com/ulfjack/ryu/blob/master/ryu/f2s.c
    comment by IshKebab · 2018-10-07 · in Writing system software: code comments
  14. To save some time: https://github.com/ulfjack/ryu
    comment by ur-whale · 2018-07-28 · in Ryū: Fast Float-To-String Conversion
  15. C code for Ryu is available under the Apache2 and Boost licenses: https://github.com/ulfjack/ryu/tree/master/ryu Also have a look at Grisu3, Dragon4, dtoa, and the printf implementations of glibc and musl.
    comment by nwellnhof · 2018-07-28 · in Ryū: Fast Float-To-String Conversion
  16. The code is here: https://github.com/ulfjack/ryu
    comment by bratao · 2018-07-28 · in Ryū: Fast Float-To-String Conversion