3 ms·
You'll be happy to hear that compilation speed is the foremost priority of the Rust developers at the moment, and is the result of a technical-debt-laden codeba
by kibwen 11y ago
You'll be happy to hear that compilation speed is the foremost priority of the Rust developers at the moment, and is the result of a technical-debt-laden codebase (having survived four years of traumatic language evolution) rather than any intrinsic property of the language. :) Huge improvements are in the pipe.
- Everlag 11y agoFantastic to hear! I don't even want to think about the horrors that 4 years of heavy core changes would do to a language.
- kibwen 11y agoThe bottom line is that self-hosting is a great way to shake down your language on a large-ish codebase and a fine way of encouraging outsider contributions, but should really only be done once you actually have a relatively solid idea of what your language is going to be. :)
- IshKebab 11y agoDo you have any evidence that it isn't an intrinsic property of the language? I would have thought all that type inference is non-trivial to calculate.
- Manishearth 11y agoThe slowest part is the LLVM passes. typecheck isn't very fast either, but it can be parallelized and it's much faster than the LLVM part. We don't really do any optimizations on the Rust side and just hand over IR to LLVM. This IR isn't of the type LLVM was built to deal with (pervasive noalias, lots of iterators, etc). It can optimize it, just that it's slow. We can work on giving better IR there. So type check is slow, but it isn't the reason we're slow. (Still, improvements to type check will help)
- kibwen 11y agoYou don't even need to trust me, use the compiler's own "time-passes" flag to see a breakdown of where the compiler spends its time on any code you wish to feed it.