[fpc-pascal] gcc beats fpc again

Daniël Mantione daniel.mantione at freepascal.org
Wed May 23 11:14:25 CEST 2007



Op Wed, 23 May 2007, schreef Jonas Maebe:

> 
> On 23 mei 2007, at 10:39, Bisma Jayadi wrote:
> 
> > Of course it's very relevant since they are all using same algorithms
> 
> No, because there are lot of ways to implement a single algorithm. Do you use
> ansistrings, shortstrings, arrays of char, or pchars? Do you use getmem or
> dynamic arrays? Do you use reference or value parameters (with or without
> "const")? Do you use virtual methods, function pointers or case statements?
> 
> Most of the discussions I've seen on irc about these benchmarks were at least
> about ways to tweak the Pascal code so it became faster (either because the
> compiler can then optimize it better, or because you are using lower level
> features which you probably wouldn't use when writing a production application
> rather than a website benchmark). This has little to do with how the compiler
> performs in real world situations.

Sorry, but this is nonsense. If you care about speed in real world 
you do exactly the same: Tweak the code, use low level features, use 
shortstrings, and so on.

It might be true that in real world application you use more high level 
features, but that is because you value comfort higher than speed then. 
For performance benchmarks, this is irrelevant.

Daniël


More information about the fpc-pascal mailing list