Mac Apps That Use Garbage Collection Must Move to ARC
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Tue Mar 3 02:17:34 PST 2015
On Tuesday, 3 March 2015 at 02:05:08 UTC, Walter Bright wrote:
> On 3/2/2015 11:38 AM, Martin Nowak wrote:
>> Compacting is indeed easy once we have a precise GC, and can
>> be done
>> partially, i.e. objects pointed to by the stack/register are
>> pinned.
>
> Also unions.
Compacting doesn't solve the inherent performance problem of a
conservative GC though. It's the capability to run small
incremental collections that make modern GCs fast. With a
conservative GC you always have to mark the complete heap to even
free a single object. Shoveling a 1GB heap from main memory
through your CPU already takes 250ms, and on top of that comes
memory latency for non-sequential traversing and the actual
marking.
More information about the Digitalmars-d
mailing list