Analysis of D GC

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 20 12:37:47 PDT 2017


On Tue, Jun 20, 2017 at 07:14:11PM +0000, Dmitry Olshansky via Digitalmars-d wrote:
> On Tuesday, 20 June 2017 at 16:49:44 UTC, H. S. Teoh wrote:
[...]
> Interestingly the moment you "reallocate" to expand the AA it will be
> considered a new object.
[...]

This is not entirely true.  The *table* itself will of course get moved
to a new object, but most of the size of the AA comes from its entries,
and those are nodes that stay in-place. You'll still have to scan
references to the table, of course, but that's a lot better than
scanning all the entries as well.


T

-- 
The diminished 7th chord is the most flexible and fear-instilling chord. Use it often, use it unsparingly, to subdue your listeners into submission!


More information about the Digitalmars-d mailing list