Mac Apps That Use Garbage Collection Must Move to ARC

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 24 11:07:00 PST 2015


On Tuesday, 24 February 2015 at 07:53:52 UTC, Jacob Carlborg 
wrote:
> On 2015-02-23 21:30, Walter Bright wrote:
>
>> Count me among those.
>>
>> In Java, write barriers make sense because Java uses the GC for
>> everything. Pretty much every indirection is a GC reference.
>>
>> This is not at all true with D code. But since the compiler 
>> can't know
>> that, it has to insert write barriers for all those 
>> dereferences
>> regardless.
>
> The alternative would be to have two kind of pointers, one for 
> GC allocated data and one for other kind of data. But I know 
> you don't like that either.
>
> We kind of already have this, class references and regular 
> pointers. But that would tie classes to the GC.
>
>> I suspect it would be a terrible performance hit.
>
> It would be nice to have some numbers backing this up.

The page fault strategy is used by ML family language's GC and 
they get really good performance out of it. That being said, in 
ML like language most things are immutable, so they are a


More information about the Digitalmars-d mailing list