# Zig's new float parser is 9,000x faster on f128 values

Original title: Zig gets improved float parser/formatter

> Hacker News story 50733624 · language: en · submitted 2026-12-02
> Web version: https://zeli.app/story/50733624
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 155 · by [Retro_Dev](<https://news.ycombinator.com/user?id=Retro_Dev>) · 💬 35
[original](<https://codeberg.org/ziglang/zig/pulls/37793>) · [HN discussion](<https://news.ycombinator.com/item?id=50733624>)

## Summary

A merged pull request replaces Zig's std.fmt.float formatting and parsing with a new algorithm based on Russ Cox's research, roughly doubling formatting speed over ryu and beating eisel-lemire by 10-20%. The biggest win is parsing floats larger than f64: f128 parsing drops from about 1.1 milliseconds to 120 nanoseconds, since the old code always fell back to slow big-integer math. Binary size shrinks too, and full-precision output is now supported.

## Key quote

> std would always parse these via the slow big int fallback which was a serious performance regression.

## HN discussion (35 comments)

### [mitchellh](<https://news.ycombinator.com/item?id=50735113>)

> 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](<https://news.ycombinator.com/item?id=50734509>)

> Call software development dead however you want. It just peaces my mind knowing there’re still people hand-crafting serious software engineering

### [karlmcguire](<https://news.ycombinator.com/item?id=50734884>)

> 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](<https://news.ycombinator.com/item?id=50734797>)

> https://research.swtch.com/fp is a must read.

### [zokier](<https://news.ycombinator.com/item?id=50737981>)

> \> 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.

---

## Cite

- Page: https://zeli.app/story/50733624
- Date: 2026-12-02
- Source: codeberg.org (https://codeberg.org/ziglang/zig/pulls/37793)
- Hacker News: https://news.ycombinator.com/item?id=50733624

## Other languages

- zh: https://zeli.app/zh/story/50733624 · markdown: https://zeli.app/zh/story/50733624.md
- ja: https://zeli.app/ja/story/50733624 · markdown: https://zeli.app/ja/story/50733624.md
- ko: https://zeli.app/ko/story/50733624 · markdown: https://zeli.app/ko/story/50733624.md
- de: https://zeli.app/de/story/50733624 · markdown: https://zeli.app/de/story/50733624.md
- es: https://zeli.app/es/story/50733624 · markdown: https://zeli.app/es/story/50733624.md
- ru: https://zeli.app/ru/story/50733624 · markdown: https://zeli.app/ru/story/50733624.md
