Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-other / 2016-11

Re: Underscores in numerical literals - grouping

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

[reply moved to fpc-other]

Mattias Gaertner wrote
My conclusion: That tabs costs less cpu time in Pascal code is a myth.

Bottom line, in both your 2nd and 3rd set of attempts, at least 2 out of the 3 compiles were faster than the (1st) baseline times. So my statement about it will take less time because there are less bytes to process holds true. :-) I never said by how much faster though. ;-)

To get more accurate results one would have to reduce the test to only parsing source code, and exclude things like deleting PPU files, compiling and binary linking. An exercise for a rainy Sunday afternoon. :)

I was impressed by how much disk space the source code reduced by. That's 3.7MB [minimum] less bytes to parse and scan.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 10 lines
[reply moved to fpc-other] On 2016-11-22 14:29, Mattias Gaertner wrote: > My conclusion: That tabs costs less cpu time in Pascal code is a myth. Bottom line, in both your 2nd and 3rd set of attempts, at least 2 out of the 3 compiles were faster than the (1st) baseline times. So my statement about it will take less time because there are less bytes to process holds true. :-) I never said by how much faster though. ;-)

Invalid cherry picking. Is the smiley for that?

To get more accurate results one would have to reduce the test to only parsing source code, and exclude things like deleting PPU files, compiling and binary linking. An exercise for a rainy Sunday afternoon. :)

Deleting PPU files takes 0.7 secs.
Why should compiling and linking be removed from the compiler time?

I was impressed by how much disk space the source code reduced by. That's 3.7MB [minimum] less bytes to parse and scan.

The 3.7MB is 0,5% to 1% depending on source distribution.

Graeme, the space and time savings are simply weak arguments for using tabs in Pascal. You gave some better arguments for Elastic tab stops and you should concentrate on them.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
Why should compiling and linking be removed from the compiler time?

Compiling works on in-memory data structures (supplied by the tokenizer and such) and linking works on newly created object files on disk. Both have nothing to do any more with the original source code units.

Regards,
Graeme

Reply by email