A bug in my code

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon Sep 8 12:18:01 PDT 2008


On Mon, Sep 8, 2008 at 11:01 AM, bearophile <bearophileHUGS at lycos.com> wrote:

>>Both require Block.~this() to remove any unneeded roots or ranges<
>
> Okay, I understand now. Jarrett Billingsley has told me that those ranges are inefficient, so I hope the roots are more efficient.

They're both pretty inefficient.  Adding a root or range is pretty
fast, it might have to resize its internal array.  But removing a root
or range requires the linear traversal of the internal list of roots
or ranges as well as copying every root/range after it down a slot,
which is all very slow, as downs has found out (and patched, though
it's not in the official GC yet).


More information about the Digitalmars-d-learn mailing list