[fpc-devel] Parser speed

Florian Klaempfl florian at freepascal.org
Fri Oct 22 09:16:03 CEST 2010


Am 22.10.2010 09:18, schrieb Graeme Geldenhuys:
> Hi,
> 
> If the source code only contains tabs characters, instead of spaces,
> does... that means the source code files are a lot smaller. Does that also
> result in the compiler parsing those files faster? After all, there is a
> lot less characters to parse.

This is not done by the parser but by the scanner. In theory, it should
be faster, however, I doubt that a time difference is measurable in real
world code, the rest of the compiler needs much more time.

> 
> Anybody actually done a speed test on this to see the speed difference?

In 1.0.x the scanner took a significant amount of time due to the much
faster backend. I don't think it will matter with 2.x



More information about the fpc-devel mailing list