Mac Apps That Use Garbage Collection Must Move to ARC
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 23 23:53:51 PST 2015
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.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list