More radical ideas about gc and reference counting

Peter Alexander via Digitalmars-d digitalmars-d at puremagic.com
Sat May 10 07:23:11 PDT 2014


On Saturday, 10 May 2014 at 13:50:05 UTC, Dicebot wrote:
> On Saturday, 10 May 2014 at 13:33:40 UTC, Manu via 
> Digitalmars-d wrote:
>> On 10 May 2014 17:08, Andrei Alexandrescu via Digitalmars-d
>> <digitalmars-d at puremagic.com> wrote:
>>> On 5/9/14, 11:27 PM, Manu via Digitalmars-d wrote:
>>>>
>>>> ARC overhead would have no meaningful impact on performance, 
>>>> GC may
>>>> potentially freeze execution. I am certain I would never 
>>>> notice ARC
>>>> overhead on a profiler, and if I did, there are very simple 
>>>> methods to
>>>> shift it elsewhere in the few specific circumstances it 
>>>> emerges.
>>>
>>>
>>> This is very, very, very wrong. -- Andrei
>>
>> Is there any evidence to support that assertion?
>> I have many colleagues who work on phones. The patterns I see 
>> are that
>> the iOS guys who use Obj-C never complain about it, and the GC 
>> guys
>> are often struggling with it.
>> The bias in gamedev is strongly towards iOS too, so that 
>> should be a
>> more populous group to draw samples from.
>
> You conflate freezing and performance. ARC easily can be slower 
> but is has benefit of slowdown distributed more evenly thus not 
> obviously notable.

It should be noted that reference counting can also cause large 
stalls when a root object is freed, causing a cascade of 
decrements-to-zero, which would have been handled better by a GC.


More information about the Digitalmars-d mailing list