Is Phobos's Garbage Collector utterly broken? (Phobos vs Tango)

Sean Kelly sean at f4.ca
Thu Aug 2 14:59:37 PDT 2007


Dave wrote:
> Vladimir Panteleev wrote:
>> On Wed, 01 Aug 2007 17:48:26 +0300, Sean Kelly <sean at f4.ca> wrote:
>>
>>> It turns out this is because GrowBuffer uses a void[] internally to
>>> store data.  The type should probably be changed to byte[].  I'll file a
>>> ticket for it.
>>
>> Cheers, that indeed fixed it. And now it runs much faster than the 
>> Phobos version, too!
>> 
> I thought the Phobos and Tango GC's were basically the same -- has that 
> changed over the last 1/2 year or so?

No.  They're still basically the same.  But some of the differences that 
exist both there and in the runtime could have a noticeable impact on 
performance in some situations, as this test shows.  Also, recent 
discussion about this issue has inspired me to make some additional 
changes that will further affect certain aspects of how memory is 
managed, etc, and these could have an impact on the performance of some 
corner cases (or at least that's my hope).

Eventually, I'd like to spend some time developing a new GC which is 
more oriented towards multithreaded programming.  But that promises to 
be a fairly large project, and I don't have time for it quite yet.


Sean



More information about the Digitalmars-d mailing list