[fpc-devel] FPC/Lazarus Rebuild performance

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Sep 11 22:04:19 CEST 2010

On 11 Sep 2010, at 21:10, Florian Klämpfl wrote:

> Anyways, before this ends in an endless discussion: if anybody is
> interested in improving FPC compilation speed (for my needs is
> sufficient) and have a look at fillchar and, have a look at FPC's unit
> loading algorithm (not the actual i/o itself but how all the symbols
> classes etc. are restored). This two points are bottlenecks which might
> help when they are improved, though it's pretty unlikely that this will
> improve things more than a few percent.

Note that in 2.5.1 it will already be somewhat faster because of r15604 (removes a lot of calls to fillchar from the register allocator) and r15515 (optimizations to sysfreemem_fixed).

In attachment you can find the time profile of the current FPC svn trunk compiling mseide svn trunk under Mac OS X (after some minor changes to the source code to get it to compile). This is with assembling and linking disabled to minimise interference (but including the external assembler writer). I've expanded some call stacks to show where generic routines are called from.

At the top level, the % means "x % of the execution time was spent in this routine". At the lower levels, it means "x% of the execution time spent in the top level routine was due to calls from this routine".

As you can see, there is not really any one hot routine that can be optimised to speed up everything a lot.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: msecompile.zip
Type: application/zip
Size: 17812 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100911/a612e9a5/attachment.zip>

More information about the fpc-devel mailing list