[fpc-devel] building fpc / fpmake and multicore cpu ?

Joost van der Sluis joost at cnoc.nl
Mon Oct 3 16:22:51 CEST 2011


On Sat, 2011-10-01 at 09:24 +0100, Martin wrote:
> I noticed, when I build fpc, then I get cpu usage between 70% and 100%. 
> So it appears that both cores of my pentium are used.
> 
> But when a package is compiled using fpmake, then it drops to 50%, so 
> apparently only one core is used?
> 
> Is that correct? Does the old Makefile driven compilation use both/all 
> cores, while packages done via fpmake, are using one core only?

Not completely, when you use 'make -Jx' with x>1 then the old makefiles
can use multiple threads to actually compile. But it could be that some
overhead is done in a second thread?

As fpmake is now used in trunk the biggest disadvantage is that for each
unit that is compiled a instance of the compiler is invoked. If you add
'-bu' to the fpmake commandline, it outperforms the 'older' makefiles.

There's also a multi-threaded version of fpmake, but that's not comitted
yet.

Joost

-- 
My Lazarus blog: http://www.lazarussupport.com/lazarus/weblog




More information about the fpc-devel mailing list