Introducing Sampling to the GC

safety0ff via Digitalmars-d digitalmars-d at puremagic.com
Sat May 24 23:17:57 PDT 2014


On Friday, 23 May 2014 at 21:14:38 UTC, Etienne Cimon wrote:
> My proposal is to implement pointer sampling in the GC (using 
> hypothesis testing - hypergeometric or poisson distributions) 
> to tweak this collection efficiency. The idea would be to be 
> able to specify how much % we'd like the GC to swipe on average 
> at every cycle, so that these cycles run less frequently.

Now I understand what you mean.

I think this is an interesting idea. I've used the idea of 
reducing collection frequency to trade off running time for peak 
memory usage before.

I would be interesting to have these "knobs" available to turn to 
tune application performance.

I think we should do something similar to CDGC for this: use 
environment variables to set the settings at initialization time.


More information about the Digitalmars-d mailing list