[fpc-pascal] Why is cthreads unit not included by default
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Aug 27 19:08:10 CEST 2009
On Thu, 27 Aug 2009 18:57:58 +0200
Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> On 27 Aug 2009, at 18:55, Jonas Maebe wrote:
>
> > Without saying what this command line application and this LCL
> > application do exactly, it's kind of hard to understand this
> > conclusion.
>
>
> Oh, now I see that the procedure was put below :) That it's quicker
> with cmem is reasonably logical: FPC's heap manager is not very good
> at reallocating memory.
What reallocating memory do you mean?
s1:=IntToStr(Paramcount+12345);
s2:=IntToStr(Paramcount+23456);
for i:=1 to 500000000 do begin
s:=s1;
s:=s2;
end;
I only change reference counters, don't I?
> I didn't see any timings for the command line app in your post
> though.
That was in the very first post of this thread:
Under my Linux machine the above program takes about 7.5 seconds.
Uncomment the cthreads unit: 7.5 seconds
Under OS X the above program takes on my mac book about 15 seconds.
Uncomment the cthreads unit: 21 seconds
> I guess the difference between the command line and LCL app
> is simply due to alignment differences, causing different cache
> behaviour.
Mattias
More information about the fpc-pascal
mailing list