On 4/3/15 11:06 AM, Atila Neves wrote:


It's true that it's not always faster to compile each module separately,
I already knew that. It seems to me, however, that when that's actually
the case, the practical difference is negligible. Even if 10x slower,
the linker will take longer anyway. Because it'll all still be under a
second. That's been my experience anyway. i.e. It's either faster or it
doesn't make much of a difference.

Whoa. The difference is much larger (= day and night) on at least a couple of projects at work.

All I know is I've seen a definite improvement in my
edit-compile-unittest cycle by compiling modules separately.

How would the decoupling happen? Is the user supposed to partition the
binary into suitable static libraries? Or is the system supposed to be
smart enough to figure that out?

Smarts would be nice, but in first approximation one package = one compilation unit is a great policy.


Andrei

Reply via email to