[fpc-devel] Parallel processing in the compiler

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Sep 4 19:18:06 CEST 2010

On 4 September 2010 18:49, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> Personally I enjoy the fact that FPC only goes up to 50% of the CPU
> usage (using 1 processor fully out of 2 processors) and then I can
> keep working normally with OpenOffice and other heavy stuff.

That's the joy of the thread scheduler under Linux. It works so much
better than under Windows (don't know Mac's, so can't comment there).
Linux lets thread work slightly longer, so less switching and each
thread actually get more done than simply setting up data after each
quick switch.

PS: I noticed this (and first thought it was a FPC Linux bug) with a
Thread Manager Demo I wrote some years back. If you don't make a
thread work hard enough, it delays switching even more and acts more
like a single threaded app. This is clearly visible if you port the
Delphi Thread Sorting demo to FPC with Linux/Windows. Now that I have
a quad core setup, I should actually review these demos again, to see
how it behaves now.

If you want to know more (and if you use Linux), I can search my mail
archive for the internet links explaining this in a lot more detail.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the fpc-devel mailing list