logoalt Hacker News

afdbcreidyesterday at 2:49 AM1 replyview on HN

That is common wisdom but reality is more complicated. It's true in some projects, but not all.


Replies

simonaskyesterday at 7:11 AM

Every analysis of the problem I've seen has concluded that the main problem is that rustc generates a lot of input to LLVM. Efforts to reduce compilation times are currently focused on doing more to the IR before converting it to LLVM IR.

Rust as a language is even more reliant on monomorphization and inlining than C++, due to core language traits such as Deref, AsRef, From/Into, and so on.

That said, in practice my personal experience has been that Rust compares pretty favorably on compilation speed, even to some high-level languages like C#. On many developer machines, the actual slow part is linking.

show 1 reply