Get the latest tech news
Speeding up the Rust compiler without changing its code
…Yes, I know that the title looks like a clickbait. But it’s actually not that far from the truth :)
It took some back and forth to experiment with the set of crates that it made sense to profile before we started hitting diminishing returns, but otherwise it was a pretty simple change, and provided very nice gains! This turned out to be a bit more involved because LLVM uses a different approach for setting the profile paths than rustc, but it wasn’t that complicated in the end, and it has resulted in a small, but nice win. I got an answer from bjorn3, who is IMO one of the leading experts on rustc backends, codegen, and basically anything Rust :D His response wasn’t very optimistic (you can read it in the topic link above), so I put LTO to rest for some time.
Or read this on Hacker News