[fpc-devel] FPC/Delphi/FastMM4/TopMemory speed test
Adem
listmember at letterboxes.org
Sat Jul 17 02:31:18 CEST 2010
I did some rough + emprical (i.e. non-exhaustive + non-authoritative)
tests with the native memory managers of
-- x64 FPC (v2.4.3)/Lazarus (v0.9.29-26670),
-- Delphi (2010),
-- FastMM4 v4.94
-- TopMemory v3.54.
Test application is fairly simple: Using a double-linked list, it
generated 1,000,000 nodes and freed them. I repeated these 12 times. I
ignored duplicate speed values [also ignored negative resuls, see note 2
below.]
Timing values were obtained by the use of this function:
function GetCPUTicks: Int64;
asm
RDTSC;
end
FPC timings: 481.88; 483.29; 483.78; 484.37; 484.60; 485.01; 485.88;
487.01; 488.43; 491.07; 492.20; 525.44
FPC average: 489.42
TopMemory timings: 411.83; 412.52; 412.63; 412.83; 413.30; 413.72;
414.00; 414.25; 414.62; 415.94; 416.05; 553.15
TopMemory average: 425.40
Delphi timings: 301.06; 302.19; 302.35; 302.49; 302.62; 302.68; 302.94;
303.74; 304.18; 306.45; 308.02; 309.28
TopMemory average: 304
FastMM4 timings: 279.74; 282.08; 282.26; 282.37; 282.56; 282.76; 282.80;
282.81; 282.97; 283.09; 283.60; 284.18
FastMM4 average: 282.60
Here are the ratios I ended up with.
Delphi/FastMM4 = 1.0757
FPC/Delphi = 1.6099
FPC/FastMM4 = 1.7318
FPC/TopMemory = 1.1504
TopMemory/Delphi = 1.3993
TopMemory/FastMM4 = 1.5053
From these, it's clear that FastMM (latest version) is the fastest.
As far as FPC is concerned, switching to TopMemory would mean a speed
loss of %15 --for my test application.
Notes:
1) These were the compiler options used: -MObjFPC -Scghi -O3 -OoREGVAR
-gl -WG -vewnhi -l -Fu. -dLCL -dLCLwin32
2) Under FPC I got some negative values between a GetCPUTicks and
another one taken later. Even though I ignored those values, I'd love to
know why/how that happens.
More information about the fpc-devel
mailing list