[fpc-devel] Messages overhead

Daniël Mantione daniel.mantione at freepascal.org
Wed Jul 14 17:17:51 CEST 2010

Op Wed, 14 Jul 2010, schreef Hans-Peter Diettrich:

> IMO compiler messages slow down compilation a lot.

How do you know this, did you benchmark or is it just your opinion?

> When messages are not really output (prevented by message level...), 
> then a lot of procedure calls and string operations can be avoided, when 
> the message preparation is bypassed at all.
> verbose.Message1 ff. could check the level (and exit accordingly) prior to 
> any further work.
> MayBeLoadMessageFile could be moved into Msg2Comment in most cases, and again 
> a quick check (or inline) can prevent calling this subroutine at all.

Sounds reasonable to me, but wether it will speed up compilation is 
another question. Anyway, simply write a patch, could be a nice excercise 
to get started with compiler development.


More information about the fpc-devel mailing list