hn.today

How to speed up the Rust compiler in September 2026

nnethercote.github.io272 points162 comments
Screenshot of How to speed up the Rust compiler in September 2026

Measurements from 2026-07-29 to 2026-09-28 show a substantial improvement in Rust compiler performance: mean wall-time dropped 4.57% across 629 benchmarks (555 improved, 74 regressed). Major wins include rustdoc optimizations, Clippy enabled with PGO giving up to 18% wall-time improvements, and an LLVM upgrade to LLVM 23 yielding a 1.2% mean reduction. Enabling the new borrow checker Polonius Alpha introduced regressions for some code (notably serde), but targeted fixes - lazy liveness computation (#161938) and data-structure/inlining tweaks (#163027) - reduced serde instruction counts by 3-5% and produced small wins elsewhere. A broad “sea of green” resulted as many improvements outweighed regressions.

Several other focused changes delivered measurable wins. The new trait solver (nicknamed Pineapple Häagen-Dazs) required extensive tuning; a set of PRs produced dramatic reductions for outlier crates (examples: 50%, 25%, 15%). Contributor xmakro made multiple optimizations (impl handling −1.58% cycles, incremental-load improvements up to −6%, allocation reductions up to −2%, static-dispatch fixes sub-1%). Dataflow work (#160193) changed CFG traversal and cut a cranelift-codegen check build’s time by ~30%; EverInitializedPlaces tuning (#160033) reduced a match-stress benchmark by 17%. Miscellaneous fixes - raising compiler stack size, rollup merges to handle many perf PRs, and a small AST→HIR cleanup - added further sub-percent to few-percent gains. The author will join Hexcat to continue compiler performance work.

Read on nnethercote.github.io162 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Zig v0.17.0

Zig v0.17.0

Zig 0.17.0 introduces a reworked build system, including a new Build Server Protocol and enhanced ELF Linker for better incremental compilation on x86_64-linux. The release also features numerous language, standard library, and package management improvements contributed by over 200 developers. (ziglang.org)

Hardly Promethean

Hardly Promethean

Decreasing costs of native app development and performance optimization shift the software bottleneck from coding to deployment and maintenance. Experts argue that while technology enables faster coding, managing and shipping updates remains a significant challenge. (jardo.dev)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.