Story

On air. The free wire runs 15 minutes behind live. See pricing

World, crypto, finance and tech news, scored for impact.

TechHacker NewsFiled 10 h ago

benchfmt.rs: Bringing Go's Benchmarking and benchstat Workflow to Rust

Open the sourceReported by Hacker News, bwplotka.dev, 4 November 2026
Impact 30 of 100, routine

Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.

The developer Bartłomiej Płotka released benchfmt.rs, a zero-dependency Rust benchmark runner that emits Go's benchfmt format and includes a Criterion and libtest converter, a thread-local heap allocation counter tracking B/op and allocs/op, pprof profiling, and the same CLI flags as `go test -bench`. The tool targets gaps in Rust's standard benchmarking stack—no standard case-comparison projections, heap allocation measurement, or pprof support—and is demonstrated on two workloads: a 36-line unsigned LEB128 varint decoder processing a 4,798-byte fixture of 2,000 uint64 values, and Prometheus Remote Write 2.0 protobuf decoding, benchmarked across Go and multiple Rust frameworks. The work matters because benchstat-style A/B microbenchmarking has been a Go-centric workflow, and a compatible format lets teams compare Rust implementations against each other and against Go without adopting a new runtime. All benchmark code and raw outputs are published in the bwplotka/benchmarks repository under rust-go-decode. Next to watch: whether the converter sees adoption beyond the author's own comparisons and whether Rust tooling converges on a shared benchmark format.

Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.

Named in this story

benchfmt.rs, Go, Rust, benchstat, Criterion