5 ms·
I think it's overreaching to say very little. It's certainly true that the Rust compiler does quite a lot of analysis (more than Go), e.g. non-trivial type inf
by dbaupp 11y ago
I think it's overreaching to say very little.
It's certainly true that the Rust compiler does quite a lot of analysis (more than Go), e.g. non-trivial type inference and borrow checking. In fact, a no-op build of libcore takes 12s for me, with 5s in type checking, 0.8s in borrow checking and less than 3s interacting with LLVM (~1s of which are LLVM actually running). Turning on optimisations pushes the LLVM time out to 4s. Similarly, libstd takes 8s to build without optimisations and LLVM only runs for 1.5s (type checking itself is about the same).
(The plan to make the compiler more parallel and more incremental improve these parts without affecting the quality of the generated code at all.)
- steveklabnik 11y agoFair enough, and also, all of this changes every release, so it's possible the kinds of numbers I'm seeing are due to my projects and the time at which I last paid attention to this.
- pcwalton 11y agoTo be fair, core has lots of generics which don't get translated by LLVM at that stage.