5 ms·
We track performance: https://perf.rust-lang.org/ https://perf.rust-lang.org/ I assure you it's not an afterthought. We track performance changes every week, g
by estebank 5y ago
We track performance: https://perf.rust-lang.org/ https://perf.rust-lang.org/
I assure you it's not an afterthought. We track performance changes every week, going as far as reverting highly desired features to avoid regressions. The only reason we accept (small) regressions is for correctness fixes. This regression was only partly exercised by our perf test suite. That's how we grow it: see bad behaviour in the wild, add to the suite.
The source of rust compilation slowness usually boil down to excercising a part of the language that has O(n²) behaviour, like match arm evaluation, trait bound evaluation, or huge expansion due to monomorphization or macro expansion, and the resulting huge linking times from that, or the bottleneck that proc-macros introduce (they get compiled before they can get executed, only relevant on fresh compiles).
The regression was (partly) fixed by adding caching: https://github.com/rust-lang/rust/pull/90423/files https://github.com/rust-lang/rust/pull/90423/files and if I recall correctly was introduced by a feature change that fixed a bunch of incorrectly rejected deeply nested trait bounds.
- dwheeler 5y agoExcellent to hear! Don't get me wrong, I like Rust. I'm hoping we can get compilation speeds up over time, though, that is a common complaint.
- misnome 5y agoThanks for reposting this. I recalled reading here a while ago some posts on why and how this was put into place, but I couldn't find the link.