Author Topic: CodeBlocks and dual core for compilation  (Read 4580 times)

Offline wxuserbrest

  • Multiple posting newcomer
  • *
  • Posts: 22
CodeBlocks and dual core for compilation
« 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

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: CodeBlocks and dual core for compilation
« Reply #1 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

Offline matioupi

  • Multiple posting newcomer
  • *
  • Posts: 20
    • Incub'
Re: CodeBlocks and dual core for compilation
« Reply #2 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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: CodeBlocks and dual core for compilation
« Reply #3 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline matioupi

  • Multiple posting newcomer
  • *
  • Posts: 20
    • Incub'
Re: CodeBlocks and dual core for compilation
« Reply #4 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 !)