Easy & huge GC optimizations

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Fri May 23 11:52:13 PDT 2014


On 2014-05-23 2:14 PM, Rainer Schuetze wrote:
> BTW: How do you detect the sample pointers are alive? Or do you mean
> just the roots?

You store a void** and the original value, dereference it to see if it's 
the same value as the original. Loop through 20 of those if you have 
500, and you update them during marking by taking 1 in 20.

There's mathematical proof that you if you don't have 5 of those dead, 
you're great to go and don't need to collect.

Being flexible enough, you can skip 9 in 10 collections altogether imo

see this:
https://github.com/D-Programming-Language/druntime/pull/803

also mathematical proof is at page 154-183 of:
http://books.google.ca/books?id=b-XFrpBQ7d0C&lpg=PA119&pg=PA154#v=onepage&q&f=false


More information about the Digitalmars-d mailing list