How to speed up the Rust compiler in 2022.
Between 2016 and 2020 I wrote a series of blog posts called “How to speed up the Rust compiler”. These were mostly about my work on the Rust compiler, plus some updates on the progress on the Rust compiler’s speed in general.
Read in full here:
This thread was posted by one of our members via one of our news source trackers.
2 Likes
Compiling has definitely gotten faster over time. The slowest part is the linking step, specifically LTO, but that’s not a Rust tool, that’s just the standard gcc one or llvm or whatever platform you are on. I’ve been using mold recently for debug linking and it is soooo much faster! I don’t think its planned for it to have the substantial LTO capabilities that ld or lldb or whatever llvm’s linker was have, but it is designed for speed and speed it is great it! It’s awesome to use regardless of the language you use as long as it uses a system linker for making the final binary.
2 Likes
Rust compiling indeed has gotten faster and now my slowest parts on macOS are the linker and sometimes sccache. I hope mold or similar projects come to macOS soon!
But I already have plans to having a second dev machine with Linux and I hear things are better and faster there.
2 Likes