3 ms·
> You've said most of your build time was linking, so wouldn't you get the same build times with C? C++ generally incurs a price on link times too. For example
by forgettableuser 11y ago
> You've said most of your build time was linking, so wouldn't you get the same build times with C?
C++ generally incurs a price on link times too. For example C++'s stronger type system creates more burden on the name mangling, like there is actually a difference between an int and long, even if they are the same size on the system. Then if you have code that doesn't make this distinction, overloaded functions need to be generated which creates more generate code bloat. Then if you throw templates into the mix, C++ generates a ton of symbols for every permutation. This is why C++ object files are usually much larger than C object files and why the linking process is so much slower.