3 ms·
- A large fraction of compiler time is spent on code generation; how many of those lines did the compiler actually generate code for? (i.e. not unused functions
by comex 9y ago
- A large fraction of compiler time is spent on code generation; how many of those lines did the compiler actually generate code for? (i.e. not unused functions or uninstantiated templates)
(And in the case of uninstantiated templates, a C++ compiler doesn't even need to type check them…)
- Did you have optimizations enabled?
- civility 9y ago> how many of those lines did the compiler actually generate code for? Not many. How many lines would a comparable Rust program have to instantiate? (should be the same) All I was trying to do was make an apples to apples comparison by discrediting the implication that the clang++ and g++ compilers are only faster because people use separate compilation units. I think it's fair to compare Rust and C++ this way, and if Rust is slower to compile, then it's fair to ask why. > Did you have optimizations enabled? Yes, -O3. Also -Wall -Wextra and -fwrapv if you're interested.