Re:Rust in Linux kernel is just a beginning
by alpaca128 on Tuesday October 25, 2022 @08:17AM
(#33329483)
The borrow checker is only one reason for the slow compile times. Cargo provides a separate `check` command to only do code & typechecking and that can be much faster than full compilation. LLVM and the way rustc interacts with it also plays a role.
In my experience when compilation takes longer the actual delays are in the last steps, long after the compiler is done checking and printing warnings.
On an unrelated note, I also noticed a large amount of static string literals in the code can slow down compilation to a surprising degree.
In my experience when compilation takes longer the actual delays are in the last steps, long after the compiler is done checking and printing warnings.
On an unrelated note, I also noticed a large amount of static string literals in the code can slow down compilation to a surprising degree.