Back
How rustc got faster in September 2026: mean compile time down 4.57%
SiTech AI Team3 წთ. საკითხავი

How rustc got faster in September 2026: mean compile time down 4.57%

Rust compiler benchmarks measured between 29 July and 28 September 2026 show a mean wall-time reduction of 4.57%: of 629 measurements, 555 improved and only 74 regressed. Nicholas Nethercote's monthly review explains what changed.

Nicholas Nethercote published his latest review of the Rust compiler's performance on 30 September 2026.

Overall progress

Across benchmarks measured between 29 July and 28 September 2026, the mean wall-time reduction was 4.57%. Of 629 benchmark measurements, 555 improved and only 74 regressed. Nethercote calls the result “a sea of green”.

rustdoc, Clippy and LLVM 23

rustdoc saw large speed wins from Noah Lev, who has since written a post on how he achieved them. For Clippy, Jakub Beránek enabled PGO (#159642), improving wall-time across most Clippy benchmarks, by 18% in the best case. Nikita Popov upgraded the compiler to LLVM 23 (#158734); mean wall-time across all benchmarks fell 1.2%.

The new borrow checker and trait solver

Two long-running components were enabled on Nightly: the new borrow checker, Polonius Alpha, and the new trait solver. Polonius Alpha is more precise and accepts some valid programs the old checker rejected, but it does more work, a measurable compile-time cost in a minority of cases, including the popular serde crate. Jack Huey made some liveness computations lazy (#161938), cutting serde's instruction counts by 3-5%, and adjusted a data structure and inlining in #163027 for mostly sub-1% gains elsewhere.

The new trait solver is also slower in a minority of cases. Jana Dönszelmann wrote a detailed post on improving its performance, while Nethercote's own pull requests (#160479, #160605, #160801, #160892, #161077 and #161211) cut compile times sharply on outlier crates: 50% in one case, 25% in another, 15% in a third, and even more on one stress test.

xmakro and dataflow analysis

New contributor xmakro continued a run of optimizations. #157281 optimized impl handling while building the specialization graph, a mean cycle-count reduction of 1.58% across all benchmarks; #158059 sped up one aspect of loading incremental compilation data, in the best case by 6%; #160473 removed allocations from a hot obligations-processing path, in the best case by 2%; and #160268 swapped dynamic dispatch for static dispatch in the old/new trait solver selection code.

Nethercote also changed the CFG traversal algorithm used by the compiler's dataflow analyses (#160193). The cranelift-codegen crate has one enormous function with over 18,000 basic blocks: the old algorithm needed 1.5 million calls to apply_effects_in_block to reach a fixpoint for the EverInitializedPlaces analysis, the new one needs 90,000. That delivered a roughly 30% wall-time reduction for a check build of the crate. A further change (#160033) cut instruction counts on the match-stress benchmark by 17%.

Other changes include #160535, where Chris Denton increased the compiler's default stack size, cutting instruction counts in the best case by almost 3%. Nethercote starts a new job at Hexcat tomorrow, working on the compiler performance optimizations project goal.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.