More embarrassing microbenchmars for D's GC.

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Sep 16 07:24:23 PDT 2010


On 9/16/10 5:41 CDT, Rounin wrote:
> Thank you for that advice. I'm using GDC because it's available from Ubuntu
> Linux's package system, whereas DMD currently is not. (And the .deb posted on
> digitalmars.com is only for i386.) Hopefully, D will gain more popularity and more
> up-to-date tools will be made available.
>
> By the way, today I re-compiled the program with a "std.gc.enable;" right before
> the final "return 0" statement, and it still runs in 0.68 seconds. So either those
> objects aren't marked as needing garbage collection, or it's really just an issue
> of keeping the garbage collector from activating too quickly.

I have noted this trigger happiness of the GC since way back during my 
doctoral work, and conveyed it several times to Walter and Sean. They 
haven't gotten around to it, but I carry most of the blame because it 
was a pressing matter to me, not to them.

There are two issues: one is the GC jumps in too early, and the other is 
it jumps in too often. A program of mine had a pattern in which it would 
need a lot of memory for a long time, during which it would do the 
occasional small string allocation etc. There would still be a lot of 
collection attempts going on; the GC failed to notice that repeated 
collections do not recover much memory.

Thanks Rounin for the comparison. I think it's a great test bed for D's 
collector. If you could share the data too, that would be great.


Andrei


More information about the Digitalmars-d mailing list