Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: wxuserbrest on August 02, 2008, 04:42:46 pm

Title: CodeBlocks and dual core for compilation
Post by: wxuserbrest on August 02, 2008, 04:42:46 pm
Hi,
when i use a makefile i can do make -j 3 to compile 3 files at the same time as i have a dual core. But when i compile with codeblocks (without makefile as i never tried makefile with codeblocks) it seems that only one file is compile at the same time. Is there a place to ask codeblocks to compile more file at the same time ?
Thanks
Title: Re: CodeBlocks and dual core for compilation
Post by: JGM on August 02, 2008, 05:07:45 pm
Here you go:

Settings->Compiler and debugger->Global compiler  settings->Other settings->Number of processes for parallel build
Title: Re: CodeBlocks and dual core for compilation
Post by: matioupi on August 03, 2008, 11:14:14 pm
Hello,

is there a particular reason to set 3 if you have a duel core ? Why don't you set just 2 ?

Regards
Title: Re: CodeBlocks and dual core for compilation
Post by: thomas on August 04, 2008, 12:10:23 am
is there a particular reason to set 3 if you have a duel core ?
Yes, on most systems, performance is better with an extra process. Depending on your configuration (system RAM and hard disks), even two extra processes are benefitial.
Having an extra process causes a few more context switches, but on the positive side, it greatly increases parallelism and hides latencies.
Title: Re: CodeBlocks and dual core for compilation
Post by: matioupi on August 05, 2008, 07:15:49 pm
Thank you, i've always been using 2 process on a dual core... and that's true there is a little gain at 3 and even at 4 process !
(but the machine is then unuseable for anything else... get totaly stucked at its hard work !)