The article explores 'yy', a highly optimized double-to-string conversion algorithm from the yyjson library that reduces Schubfach-family algorithms to a single multiplication by precomputed powers of 10. It details how yy uses fixed-point arithmetic and decimal grid intersection to find shortest round-trippable decimal representations efficiently, with a visualization focusing on boundary cases.
Background
yyjson is a high-performance JSON parsing library where number formatting is a critical bottleneck. The yy algorithm represents an engineering optimization within the well-studied Schubfach family of binary-to-decimal conversion methods.
- Source
- Lobsters
- Published
- Aug 12, 2026 at 12:42 AM
- Score
- 7.0 / 10