4 ms·
But LLVM is written in C++ so “should be fast” based on language choice only. Didn’t know about that backend though, will check it out, thanks!
by kaba0 4y ago
But LLVM is written in C++ so “should be fast” based on language choice only.
Didn’t know about that backend though, will check it out, thanks!
- sanxiyn 4y agoLLVM's fast path (used by clang -O0) is fast. Rust's primary problem is that it can't use LLVM's fast path (because it implements only a subset of LLVM IR) and LLVM upstream is uninterested in extending it because it will slowdown clang -O0.
- AndyKelley 4y agoAre you referring to FastISel? We use that in Zig but our time spent compiling is still 77% waiting for LLVM to emit an object file.
- sanxiyn 4y agoYes. I guess FastISel still isn't fast enough to overcome larger compilation unit, but isn't it a substantial improvement over the default code generator?
- AndyKelley 4y agoI'm sorry, I haven't taken any measurements to find out the answer to this question. I would be curious to hear about how much it affected Rust builds if you explore this. I remember I spent an afternoon trying to enable FastISel in order to speed up LLVM, only to realize that we had been using it all along.