3 ms·
> In what language can we have both? D has very fast compilation times compared with C++. Rust is another option.
by Shorel 9y ago
> In what language can we have both?
D has very fast compilation times compared with C++.
Rust is another option.
- twic 9y agoRust doesn't compile very quickly at the moment. Helpfully, there's a live thread about the matter on r/rust [1]. Broadly speaking, it's about the same as C++. Some aspects are faster, some slower. Points worth noting (from that thread and elsewhere): * Everything up to and including typechecking (and borrowchecking) takes a third to a half of the time, with lowering from there to a binary taking the rest of the time; that means (a) you can get a 2-3x speedup if you only need to check the code is compilable, and (b) overall speed isn't likely to improve a lot unless LLVM gets a lot faster. * Rust doesn't currently do good incremental compilation, so there are potential big wins for day-to-day use there. * There is a mad plan to do debug builds (unoptimised, fast, for minute-to-minute development) using a different compiler backend, Cretonne [2]. If that ever happens, it could be much, much faster. [1] https://www.reddit.com/r/rust/comments/6m97hl/how_do_typical_rust_compilation_times_compare/ https://www.reddit.com/r/rust/comments/6m97hl/how_do_typical... [2] https://internals.rust-lang.org/t/possible-alternative-compiler-backend-cretonne/4275 https://internals.rust-lang.org/t/possible-alternative-compi...