LinkedIn Article to be: Why you need to start moving off C/C++ to D, now.

Tobias Müller via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 17 12:19:40 PDT 2014


"Araq" <rumpf_a at web.de> wrote:
> On Thursday, 17 July 2014 at 15:38:44 UTC, Tobias Müller wrote:
>> "Araq" <rumpf_a at web.de> wrote:
>>> The paper focusses on RC vs "tracing". My point is "tracing" >> vs "copying"
>>> is another tradeoff. Here is a mark&sweep algorithm:
>>>>> - Trace live objects.
>>> - For each dead object: Deallocate.
>>>>> Here is a copying GC:
>>>>> - Trace and copy live objects.
>>> - There is no deallocation step. The old region is free for >> further usage.
>> 
>> It's more like: ...
> 
> Your description is still naive and as such your post is more misleading
> than helpful. My description is naive to get the basic point across, I
> have no idea what the point of your post is.

Since you snipped everything, my points are:

1. "There is no deallocation" is just plain wrong.

2. The cost of complex object graphs vs simple objects lies in the mark,
not in the sweep. mark-copy has no advantage vs. mark sweep in that
respect. Same cost applies for RC.

3. The real difference between mark-sweep and mark-copy lies in number of
dead objects vs number of live objects.

4. Your comparison with a region allocator is moot, because _really_ just
bulk-deallocate, without a mark step.

Tobi


More information about the Digitalmars-d mailing list