3 ms·
rustc needs to look at the entire crate because there's no header files that provide information about other items like C++. rustc does parallelize internally t
by lights0123 4y ago
rustc needs to look at the entire crate because there's no header files that provide information about other items like C++. rustc does parallelize internally though: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units https://doc.rust-lang.org/rustc/codegen-options/index.html#c...
- throw10920 4y ago> Increasing parallelism may speed up compile times, but may also produce slower code Why do I have to make the choice between faster compiles and faster binaries?
- lights0123 4y agoThe exact same thing happens in C++—when you're not using LTO, you can pass multiple source files to the compiler at a time to allow these files to be optimized together, but keeping them separated at a file-level prevents optimizations such as inlining functions between them. Compiling with and without optimizations is another example of that choice.