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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Code

Code

Photo of Rust

Rust

Photo of rust compiler

rust compiler

Related news:

News photo

OpenAI’s Canvas can translate code between languages with a click

News photo

ChatGPT’s ‘canvas’ interface makes it easier to write and code

News photo

Canvas