Garbage collection in D

Robert Clipsham robert at octarineparrot.com
Wed Jun 3 04:46:40 PDT 2009


Robert Clipsham wrote:
> After porting the D version to tango:
> 
> D: 6.282s (ldmd -O5 -inline -release -L-s -singleobj gctest.d)
> C++: 4.435s (g++ -O5 gctest.d)
> 
> This is on a C2D 2.2Ghz, 2GB RAM, Linux x86-64. I don't have java 
> installed, so can't test that. Maybe if you're planning to use the GC a 
> lot you should consider using tango?

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++.


More information about the Digitalmars-d-learn mailing list