# Rust now gets Go's benchstat workflow, and the benchmarks show Rust winning

Original title: Benchfmt.rs: Bringing Go's benchmarking and benchstat workflow to Rust

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

▲ 30 · by [witcher](<https://news.ycombinator.com/user?id=witcher>) · 💬 7
[original](<https://www.bwplotka.dev/2026/rust-microbenchmarks-benchstat/>) · [HN discussion](<https://news.ycombinator.com/item?id=50369462>)

## Summary

Bartlomiej Plotka built benchfmt.rs, a zero-dependency Rust benchmark runner plus a Criterion converter that emits Go's benchfmt format, so benchstat can pivot across /key=value dimensions like language and batch size. He ported a varint decoder and a Prometheus Remote Write 2.0 decoder to both languages and measured them: Rust decodes varints at roughly 899 MB/s versus Go's 563 MB/s, and the Remote Write 2.0 gap holds too.

## Key quote

> For me, much of Rust's performance story is really good, until... I wanted to run A/B microbenchmarks.

## HN discussion (7 comments)

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

> As far as I could tell, benchstat seems to implicitly make a location-shift assumption in its interpretation of the Mann-Whitney U test, and I don't see why that assumption would hold.

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

> At last someone does this!

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

> I just keep asking the agent to throw `hyperfine` and or /`criteron` at things and hoping it's enough.
>
> Not a super clear sell here, to me, coming from this position of ignorance.  I'd love to have better background, to compare, to know more. I'll try and see, I guess! This at least sounds not so bad:
>
> \> I built benchfmt.rs, a zero-dependency Rust benchmark runner with a thread-local heap allocation counter, pprof profiler integration, and the same CLI flags as go test -bench. For those who don’t trust a new benchmarking runtime (you shouldn’t from the start!), it also ships a Criterion and libtest converter that emits Go’s benchfmt format directly.

---

## Cite

- Page: https://zeli.app/story/50369462
- Date: 2026-11-04
- Source: bwplotka.dev (https://www.bwplotka.dev/2026/rust-microbenchmarks-benchstat/)
- Hacker News: https://news.ycombinator.com/item?id=50369462

## Other languages

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