[fpc-pascal] Optimizer in 2.0
adrian at veith-system.de
Tue May 31 16:22:07 CEST 2005
It shows with useless code like simple nested for .. to loops, but also
with some more useful code like the attached RSA_Angriff from the C'T
My results are with:
fpc -Sd -OG3rp3 -XX RSA_Angriff_D5.dpr
fpc -Sd -XX RSA_Angriff_D5.dpr
The unoptimized code is faster than the optimized code.
(BTW. I choosed an example where the Delphi compiler is really worse ;-)
: 65953 ms)
Same picture with the whet.pas (whether or not the whetstone benchmark
is useful) from your source distribution.
With optimization on: 7393.72 MIPS
With optimization off: 8368.20 MIPS
Florian Klaempfl schrieb:
>Adrian Veith wrote:
>>I am newbie with fpc (but not with pascal, which I use more than 20y now).
>>We have lot of existing delphi code, which some of it, I want to port to
>>new platforms - and fpc looks like the right tool for it. But I am
>>concerned about the speed. I did some basic benchmarks and it seems,
>>that the optimizers has no effect in the 2.0 compiler (or the code even
>This shouldn't be the case in general, can you give examples or post the
>benchmark? And don't try with useless code, we don't care about optimziations
>which test only useless code which never happens in real programs.
>>With the 1.9.8 compiler, the same code executes 4 times quicker - what
>>happend (or what do I wrong) ?
>>For optimizing I use the -OG3rp3 switch - is it still valid ?
>>fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the fpc-pascal