[DGD] Is self nesting ALWAYS a bug?

Shentino shentino at gmail.com
Sat Mar 21 16:52:10 CET 2009


On Sat, Mar 21, 2009 at 6:01 AM, Felix A. Croes <felix at dworkin.nl> wrote:

> >[...]
> > I'm thinking though that cache-hot roots would minimize a good part of
> the
> > overhead.
>
> What are cache-hot roots?


The process of checking for self containment would inevitably lead to heavy
referencing of objects at the top of the containment heirarchy, aka, the
"world".

Such heavy referencing would in turn lead such objects to be:

1)  favorably tagged in CPU caches
2)  kept at the top of the LRU list when DGD decides to start evicting
objects to swap

at least, so I figure.

In phantasmal, The Void is a good example of a "cache hot root" because it
would be heavily referenced in the process of "uptracing" ourselves to check
for containment by a potential new member of our inventory.

In kotaka, that role is fulfilled by "root", and to a lesser degree, "world"
and any continents or countries and whatnot that have objects busy bustling
about inside them.

An O(logN)'ish for an O(1) trade though...seems a tad harsh.  I'll
definitely try to find a way to optimize this.

>
>
> Regards,
> Felix Croes
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>



More information about the DGD mailing list