vitaut/zmij
View on GitHub ↗ ★ 464 C
A fast floating-point-to-string conversion library for C and C++
6 mentions on Hacker News by 3 people: 0 stories, 6 comments · first 2025-12-18 · latest 2026-03-10
20082026
-
https://github.com/vitaut/zmij/commit/26b4aae7771c52314465d7... It is three months old, probably created after they submitted for publication.
comment by adampunk · 2026-03-10 · in Converting Binary Floating-Point Numbers to Shortest Decimal Strings -
…all of the tested implementations in the paper. It would have been nice if it was included. [1] https://github.com/vitaut/zmij
comment by leni536 · 2026-03-10 · in Converting Binary Floating-Point Numbers to Shortest Decimal Strings -
…. However, in terms of performance you can do much better nowadays. For example, https://github.com/vitaut/zmij does 1 instead of 2-3 costly 128x64-bit multiplications in the common case and has much more efficient digit output.
comment by vitaut · 2026-01-20 · in Floating-Point Printing and Parsing Can Be Simple and Fast -
…Rust than in C. For example, doing this sort of platform-specific optimization in C is a nightmare https://github.com/vitaut/zmij/blob/91f07497a3f6e2fb3a9f999a... (likely impossible without an external pass to generate multiple lookup…
comment by vitaut · 2026-01-14 · in Is Rust faster than C? -
I started a section to list implementations in other languages: https://github.com/vitaut/zmij?tab=readme-ov-file#other-lang... . Once yours is complete feel free to submit a PR to add it there.
comment by vitaut · 2025-12-19 · in Zmij: Faster floating point double-to-string conversion -
I've added a C implementation in https://github.com/vitaut/zmij/blob/main/zmij.c in case you are interested.
comment by vitaut · 2025-12-18 · in Zmij: Faster floating point double-to-string conversion