Remix.run Logo
▲ How to speed up the Rust compiler in September 2026(nnethercote.github.io)
18 points by trickypr an hour ago | 6 comments
▲adamch 3 minutes ago | parent | next [-]

I'm glad to see the donations from big companies to open source maintainers are making measurable difference to the Rust experience. Telling these companies that their employees spend 5% less time waiting for compilation might motivate future investment in people like Nick and the others mentioned.

▲Surac 8 minutes ago | parent | prev | next [-]

Why is the compiler slow in the first place? I have no rust knowledge, how slow us slow, lets say in comparison to a c compiler?

What is the performance killer?

▲JMKH42 4 minutes ago | parent [-]

Its similar to C++ compilers, there is no one reason. It is a language that tries to optimize a lot, its a big language, it does safety checks, it uses llvm which is a bit slow, its a language that makes use of generics which generate extra code etc etc.

▲Citrusoff 23 minutes ago | parent | prev | next [-]

The EverInitializedPlaces example really stands out. Going from ~1.5M to ~90K apply_effects_in_block calls by changing the CFG traversal is a reminder that the biggest compiler optimizations often come from changing the algorithm, not optimizing the hot loop itself.

It also seems like the new Polonius/trait-solver work is pushing compiler performance toward a more interesting problem: doing expensive analysis only when it is actually needed.

4.57% mean wall-time reduction across 629 benchmarks in two months is pretty remarkable. Great progress.

▲embedding-shape 7 minutes ago | parent [-]

> reminder that the biggest compiler optimizations often come from changing the algorithm, not optimizing the hot loop itself.

Isn't this true for most optimizations, not just in compilers? My usual goto process for optimizing is "Find stuff we're doing that we don't have to do, re-evaluate what data structures we use and then re-evaluate what algorithms we use" basically, with minor changes depending on the results. Served me well so far, and haven't (intentionally) written any compilers.

▲torutofu 29 minutes ago | parent | prev [-]

Incremental seems to keep winning the easy wins, so the interesting part is whether the remaining compile-time still lives in the same places as last year.