16 karma · joined May 26, 2022
btw the author is looking to improve the Rust version and is accepting contributions in that repo if you wanna improve the experiment
People would also complain that even though you claim “my C++ code is longer than Rust but compiles just as fast”, you’re not factoring the extra things Rust’s versions do
But he does specifically break down how much of compilation time is spent in the borrow checker, LLVM, macro expansion, etc.
In my plebeian brain I just thought “monomorphization = static dispatch” / 0-cost abstraction (vs. just writing multiple versions of a function), which both Rust generics and C++ templates fall into.
Now I see that “monomorphization” has a specific definition in FPL
If Chrome were written in Python it’d be hella slower iteration times
For small→medium projects I agree that Rust compile times are fine
I think using features of the language is fair game
btw, don't C++ templates also use monomorphization? I agree C++'s implementation is "lower level" (from a compiler perspective) than Rust generics, but that's one of Rust's selling features