My first month working on Rust compiler performance for
Hexcat is over and it’s time to see some of what’s
happened since my last
post.
Spans
Spans are a critical data structure in the Rust compiler. Every AST, HIR, and
MIR node carries a span. Each span has four fields recording the following.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要The article reports that the Rust compiler achieved a mean wall-time reduction of 4.57% between late July and late September 2026, with 555 of 629 benchmarks improving. Key contributors included enabling PGO for Clippy, upgrading to LLVM 23, optimizations for the new Polonius Alpha borrow checker and new trait solver, and numerous improvements from contributors like xmakro and the author, including a ~30% speedup for cranelift-codegen via a new CFG traversal algorithm. The author also notes they will soon start working at Hexcat on compiler performance optimization.
AI 摘要This July 2026 update on Rust compiler performance reports a 5.59% mean wall-time reduction since December 2025, driven largely by a 37.92% improvement in rustdoc (from optimized impl processing, PGO training, and faster impl sorting) plus major Clippy speed-ups from eliminating no-op virtual dispatch calls. Additional gains came from incremental compilation tweaks, AST node size reductions, and dramatic new trait solver progress, including one benchmark dropping from 27 seconds to under one second, with notable contributions from newcomers xmakro and arya dradjica. The author also thanks the weekly performance triage crew and shares personal news of leaving their job at VectorWare to pursue paid work on the Rust compiler.
AI 摘要This article reviews recent Rust compiler performance improvements as of December 2025, including optimizations like a fast path for lowering trivial consts (speeding up the libc crate by 5-15%), a more space-efficient reimplementation of format_args!(), an LLVM 21 upgrade, and reduced allocations in rustdoc-json. It also describes efforts to streamline code generated by the #[derive(Reflect)] proc macro in Bevy, cutting generated code size by 39% and compile times by 16%. Overall, mean wall-times improved by about 2.65-3.19% since May, with other metrics like memory usage and binary size showing mixed results.
AI 摘要The author announces they have joined VectorWare, a startup aiming to improve GPU programming with Rust, in a role that involves open source and some Rust compiler work while they remain a Rust compiler team member and maintainer. They clarify that speculation about their delayed announcement was unfounded—the wait was due to paperwork—and that they received interest from many employers, demonstrating Rust's adoption across a remarkably wide range of industries. They close by thanking everyone who helped during their job search.
AI 摘要macOS's XProtect antivirus feature scans every newly compiled executable for malware, which significantly slows down Rust build scripts, cargo run cycles, and especially test suites that launch many small binaries—for example, the Rust compiler's tests/ui suite dropped from 9m42s to 3m33s when XProtect was disabled. The workaround is to add Terminal as a 'developer tool' in System Settings, though this disables an OS security feature. A draft PR for Cargo would detect when XProtect is enabled and warn users about its performance impact, helping spread awareness of this little-known trade-off.