Garbage collection in D
Rainer Deyke
rainerd at eldwood.com
Wed Jun 3 12:01:40 PDT 2009
Robert Clipsham wrote:
> After reading TSalm's post, I reran the D version with the scope keyword
> at line 16:
>
> D (with scope): 1.098s
> D: 6.282s
> C++: 4.435s
>
> It seems by using scope and tango you can easily compete with C++.
'scope' eliminates dynamic memory allocation. At this point you're not
measuring the speed of the garbage collector at all. For a fair
comparison, you should also eliminate the useless dynamic memory
allocation from the C++ version.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d-learn
mailing list