Zig gets improved float parser/formatter

174 points - yesterday at 6:42 PM

Source

Comments

mitchellh yesterday at 8:03 PM
Based on Russ Cox's work. I take every opportunity I get to implore people who care about computer science and/or software engineering to read everything Russ Cox writes anywhere and everywhere, but starting on his blog is good: https://research.swtch.com/
mi_lk yesterday at 7:28 PM
Call software development dead however you want. It just peaces my mind knowing there’re still people hand-crafting serious software engineering
karlmcguire yesterday at 7:51 PM
Russ Cox inspired me 10+ years ago to get into programming (and Go). I'm glad he's still making breakthroughs. If you haven't already, check out his tour of the Acme editor:

https://www.youtube.com/watch?v=dP1xVpMPn8M

paaloeye yesterday at 7:45 PM
OneManHorde yesterday at 7:48 PM
Crazy-better in particular for 128-bit floats! Nice.

The commentary on the change is nice as well; some good improvements being deferred to a later moment, as they introduce API changes, etc.

zokier yesterday at 11:13 PM
> I've also compared to a zig implementation of zmij which is generally considered the fastest formatting implementation and found it to be generally about the same speed.

This seems somewhat unexpected. Most benchmarks I've seen put zmij significantly faster than uscale, so does this imply that the zig port of zmij is sufficiently slower to put them on more equal footing? Or did the author find additional speedups for uscale?

I do fully agree with the author on speed not being everything and adaptability etc can definitely be valid reasons to prefer this.

lnxsxu yesterday at 9:01 PM
[dead]
cromka yesterday at 8:16 PM
Honest question: given the popularity of Rust with AI projects and how things have turned upside down in general, isn’t Zig doomed at this point?