Mir

Code review comment for lp:~dandrader/mir/cross-compile-parallel

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > Good idea but:
> > NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
> >
> > Why the "+ 1"?
>
> To squeeze more juice out of the CPU, helping ensure it's 100% busy building
> the code. :)
> In my experience a CPU can handle more build threads than its number of cores
> without hampering the execution speed of the individual threads.

I sort of agree - compilation (even C++) is usually I/O bound.

I think "+ 1" is a bit arbitrary, but not harmful.

review: Approve

« Back to merge proposal