Hacker News new | ask | show | jobs
by rtoway 1610 days ago
I was under the impression that must of Rust's compile time comes down to LLVM
2 comments

It's less LLVM itself and more the amount of work that rustc gives to LLVM. Formerly for example, rustc did not do any kind of constant propagation itself and relied fully on LLVM to propagate them and say, remove any unused branches in the final expanded code. This wasted a lot of work and propagating them earlier was able to reduce compile times significantly.

So while most of the compile time is indeed usually in LLVM, there are still a lot of things rustc can do to give LLVM an easier time.

I guess using LLVM doesn't help performance, but the real 'problem' still is the language itself. Just look at C++ and it's compilers for comparison.