On 4/3/15 12:07 PM, Jacob Carlborg wrote:
On 2015-04-03 20:06, 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.

I just tried compiling one of my project. It has a makefile that does
separate compilation and a shell script I use for unit testing which
compiles everything in one go. The makefile takes 5.3 seconds, does not
including linking since it builds a library. The shell script takes 1.3
seconds which include compiling unit tests and linking as well.

Truth be told that's 5.3 seconds for an entire build so the comparison is only partially relevant. -- Andrei

Reply via email to