[fpc-pascal] First Test of FastMM4 for fpc
Florian Klaempfl
florian at freepascal.org
Mon Dec 19 11:41:30 CET 2005
Adrian Veith wrote:
> Florian Klaempfl schrieb:
>
>> Adrian Veith wrote:
>>
>>> I compiled fpc from the sources from the svn repository today, but
>>> the results are almost the same as I posted yesterday (I marked with
>>> ** where the results have changed):
>>>
>>> Test1:
>>> ** fpc (standard MM): 3.0 sec - factor = 1.30
>>> fpc (FastMM4): 2.9 sec - factor = 1.30
>>> delphi (standard MM): 3.1 sec - factor = 1.34
>>> delphi (FastMM4): 2.3 sec - factor = 1
>>>
>>> Test2:
>>> fpc (standard MM): 2.8 sec - factor = 1.47 ** fpc (FastMM4): 2.1
>>> sec - factor = 1.10
>>> delphi (standard MM): 2.9 sec - factor = 1.52
>>> delphi (FastMM4): 1.9 sec - factor = 1
>>>
>>> Test3:
>>> fpc (standard MM): 2.5 sec - factor = 1,19
>>> fpc (FastMM4): 2.1 sec - factor = 1
>>> delphi (standard MM): 3.4 sec - factor = 1.61
>>> delphi (FastMM4): 2.1 sec - factor = 1
>>
>>
>> Strange, for me most tests improved by at least 10 %. Did you use a
>> recompiled rtl compiled with -O3p3r?
>>
>
>
> You are right again ;-) I didn't compile the rtl with the new source...
>
> Now it looks like this:
>
> Test1:
> fpc (standard MM): 3.0 sec - factor = 1.30
> fpc (FastMM4): 2.8 sec - factor = 1.21
> delphi (standard MM): 3.1 sec - factor = 1.34
> delphi (FastMM4): 2.3 sec - factor = 1
>
> Test2:
> fpc (standard MM): 2.1 sec - factor = 1.23 fpc (FastMM4): 1.7 sec -
> factor = 1
> delphi (standard MM): 2.9 sec - factor = 1.70
> delphi (FastMM4): 1.9 sec - factor = 1.11
>
> Test3:
> fpc (standard MM): 2.3 sec - factor = 1,15
> fpc (FastMM4): 2.0 sec - factor = 1
> delphi (standard MM): 3.4 sec - factor = 1.70
> delphi (FastMM4): 2.1 sec - factor = 1.05
>
>
> Test1 isn't relevant anymore.
You can improve test1 by changing the moves in your program to
Move(s[1], pointer(AFS)^, AFS.l);
if there is an setlength(afs,...); before.
Background is: all indexed ansistring accesses cause an unique call, however,
after a setlength call, the ref. count of a string is 1 so the unique call can
be saved. This can be achieve by avoiding the an index ansistring access :)
The s[1] doesn't matter because it is passed to a const parameter so no unique
call is done.
> And in Test2 and Test3 fpc beats delphi
> clearly. The benefits for the FastMM4 are now not that big anymore, but
> it helps to compare delphi and fpc on a fair base, since the impact of
> the MM is now leveled out.
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list