[fpc-pascal] Underscores in numerical literals - grouping
florian at freepascal.org
Fri Nov 25 20:14:46 CET 2016
Am 22.11.2016 um 15:29 schrieb Mattias Gaertner:
> You forgot to consider how scanners work, i.e. how they check and
> skip spaces.
> Here are some numbers:
> Compiling Lazarus sources 'make clean all' 1249309 lines 3 times
> Lazarus uses indentation of 2, so replacing each double space with one
> tab saves 3.7mb. Compiling 3 times:
> This is a desktop system, so there is always a bit of noise. As you can
> see, the time difference is not measurable.
> To estimate the potential speed up:
> Replacing all multi spaces with one space saves 6.1mb. Compiling 3
> It seems scanning the spaces costs about 1%.
In case somebody is interested, the main loop for reading spaces is in
compiler/scanner.pas, procedure tscannerfile.skipspace;
More information about the fpc-pascal