Smart pointers instead of GC?

Manu turkeyman at gmail.com
Mon Feb 3 17:09:53 PST 2014


On 4 February 2014 06:52, Adam Wilson <flyboynw at gmail.com> wrote:

> On Mon, 03 Feb 2014 12:40:20 -0800, Dmitry Olshansky <
> dmitry.olsh at gmail.com> wrote:
>
>  04-Feb-2014 00:21, Adam Wilson пишет:
>>
>>> On Mon, 03 Feb 2014 12:02:29 -0800, Andrei Alexandrescu
>>> <SeeWebsiteForEmail at erdani.org> wrote:
>>>
>>>  On 2/3/14, 6:57 AM, Frank Bauer wrote:
>>>>
>>>>> Anyone asking for the addition of ARC or owning pointers to D, gets
>>>>> pretty much ignored. The topic is "Smart pointers instead of GC?",
>>>>> remember? People here seem to be more interested in diverting to
>>>>> nullable, scope and GC optimization. Telling, indeed.
>>>>>
>>>>
>>>> I thought I made it clear that GC avoidance (which includes
>>>> considering built-in reference counting) is a major focus of 2014.
>>>>
>>>> Andrei
>>>>
>>>>
>>>  ...
>>
>>> Sadly, although written as hyperbole, I feel that the above is fairly
>>> close to the actual position of the ARC crowd.
>>>
>>>
>> I won't be surprised that half of current GC problems are because it's
>> simply too stupid as an allocator. I had some numbers that I'd need to dig
>> up were GC.malloc was ~2x slower then malloc even with garbage collection
>> disabled.
>>
>> With that said I'd focus on ref-counting somehow coexisting with tracing
>> GC. It doesn't go well at the moment - try creating dynamic arrays of
>> std.stdio.File (that is ref-counted).
>>
>>
> I will not defend the current GC, it is about as stupid as you can make
> one and still have a functioning memory management system. It implements
> exactly none of the optimizations recommended for Mark-Sweep GC's in the GC
> Handbook.
>
> That said, I firmly believe that wholesale replacement of the GC is
> throwing the baby out with the bathwater. Effectively, the poor D GC
> implementation has become an excuse to launch a crusade against all GC's
> everywhere, never mind that Java and the .NET GC's are consistent examples
> of just how good GC's can actually be.


Point me at a proposal for a GC that satisfies the problems in my prior
email, which is realistically implement-able in D, and I'll shut up.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140204/f99676d9/attachment.html>


More information about the Digitalmars-d mailing list