On 19/02/2016 20:20, fpc-pascal-requ...@lists.freepascal.org wrote:
Date: Fri, 19 Feb 2016 14:01:16 +0100
From: Jonas Maebe<jonas.ma...@elis.ugent.be>
To: FPC-Pascal users discussions<fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Happy tickets benchmark

Serguei TARASSOV wrote:
>For info, simple loop test like
>
>    while i < 1000000000 do
>      i := i + 1;
>
>shows that the FPC code is 2 times slower than Delphi 7 and Borland C
>5.5 and 4 times slower that C#.
If that's really all there is in your program, then the C# compiler
probably replaces that with "i+=1000000000;" (gcc and clang definitely
will do that, I don't know about Delph 7/Borland C 5.5). This is another
kind of optimisation that is seldom useful in real world programs
(normally the loop will also do something useful, in which case you
can't do that).
MSVC does (hence I didn't include it) but all previously listed compilers don't remove the loop.
The time ratio is about
FPC - 100, Delphi 7, Borland C - 50, C# - 25, MSVC - 0.

So my doubts was about extra-code generation for the loops.

Regards,
Serguei

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to