[fpc-pascal] Will moving from due core CPU to 6 Core CPU of the same clock speed improve the speed of FPC compiling?

Martin fpc at mfriebe.de
Mon Aug 6 14:38:08 CEST 2018


On 06/08/2018 11:27, Dennis wrote:
> I have been using Intel i3 Dual Core CPU @3.4 GHz for a few years.
> If I upgrade my computer and CPU to Intel Core i5 6-core @3.6GHz,
> will the speed of FPC compilation improve noticeably?
>
> Since FPC seems to be single threaded, I wonder whether 0.2GHz 
> increase in clock speed will make any noticeable improvement in speed.
Assuming you only change the CPU, and nothing else...

Depends what you compile. And how.

For example the Lazarus IDE, can (in some cases) start more than one fpc 
in parallel. The best example is if you build the IDE itself (clean build).
The IDE detects packages that do not depend on each other, and process 
them in parallel.

So to benefit, you need to compile a project + packages, AND the 
packages must:
- need recompilation
- be structured, so they do not have a single dependency line.
The project itself will not benefit. Only (some) packages.

Compilation also depends on other hardware.
On your current setup, watch the CPU usage during compilation, is it 
100% (on one core) all the time?
IF it is not, your CPU already waits on other resources. Then the 200 
MHZ may not give you much.

Despite that do the math. It's approx 5% diff. So on 60 seconds compile 
time you could in theory save a bit over 3 seconds. (But you will 
probably get less)


A fast harddisk/ssd is another speed factor.
RAM will also help. The linker may use lots of it if you use smart 
linking. But even for compilation: Most OS will use free RAM to cache 
files. So if the ppu you just compiled, and need for the next unit, is 
still cached, then that will help a lot. (Though I have no indication at 
which RAM size you get how big a benefit)

Also watch how much free RAM you have during compilation.



More information about the fpc-pascal mailing list