[fpc-pascal] Re: Why is Random(255) some 529x slower compared to Delphi7?

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Dec 9 09:05:11 CET 2011


On 9 December 2011 09:55, Vincent Snijders  wrote:
> Can you compile the fpc version for 32 bits (may make some difference)
> and run it on windows (probably make no difference) to reduce the
> differences in platform when you compare with Delphi?


-----------------------FPC 2.4.5 (r17953 from fixes_2_4 branch) -----------
Y:\tests\random_test>C:\FPC\2.4.5\bin\ppc386.exe speedtest.pas
Free Pascal Compiler version 2.4.5 [2011/08/15] for i386
Copyright (c) 1993-2010 by Florian Klaempfl

Y:\tests\random_test>speedtest
Length(psData) = 200401
ByteValue: 180
Length(Source) = 200401
First Loop....
elapsed time: 7421
---------------------------------------------------------------------


So that's 7421 (FPC 32bit) divided by 11 (Delphi 7) = 674 times slower


I'm compiling FPC 2.5.1 for 32bit windows now, to see if there is any
difference between FPC versions, but I doubt there would be a big
difference.

What is weird is that the 32bit FPC is so much faster than the 64bit
FPC. Strange...

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list