[fpc-pascal] Re: Why is Random(255) some 529x slower compared to Delphi7?
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Dec 9 08:44:56 CET 2011
On 8 December 2011 21:39, Florian Klämpfl <florian at freepascal.org> wrote:
> Can you please post your test program? On my core 2 duo it is only 10
> times slower.
Attached in the first post. Here is my console output for compiling
and running that test program.
-----------------[ FPC under linux ]-----------------------
[random_test]$ fpc speedtest.pas
Free Pascal Compiler version 2.5.1 [2011/09/20] for x86_64
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling speedtest.pas
Linking speedtest
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
71 lines compiled, 0.6 sec
[random_test]$ ./speedtest
Length(psData) = 200401
ByteValue: 171
Length(Source) = 200401
First Loop....
elapsed time: 11250
----------------------------------------------------------------
And here is the output under Windows with Delphi 7 Enterprise
--------------------[ Delphi 7 ]-------------------------------
Y:\tests\random_test>dcc32 speedtest.pas
Borland Delphi Version 15.0
Copyright (c) 1983,2002 Borland Software Corporation
speedtest.pas(72)
73 lines, 0.11 seconds, 72504 bytes code, 3593 bytes data.
Y:\tests\random_test>speedtest.exe
Length(psData) = 200401
ByteValue: 209
Length(Source) = 200401
First Loop....
elapsed time: 11
-----------------------------------------------------------------
So 11250 (FPC) divided by 11 (Delphi) = 1022 times slower... even
worse than before!
FPC 2.5.1 is from the 'fixes_2_6' branch at r18090.
My system has a Intel Core 2 Quad Q9400 CPU @ 2.66GHz with 4GB memory
running Ubuntu 10.04.3 (64-bit). Windows is running under VirtualBox
4, and is Win2000 with SP4 installed and hardware virtualization
enabled.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
More information about the fpc-pascal
mailing list