[Gc] Re: Partially scanning a VM's call stack

Shiro Kawai shiro at lava.net
Thu Aug 20 12:56:00 PDT 2009

From: ludo at gnu.org (Ludovic Courtès)
Subject: [Gc] Re: Partially scanning a VM's call stack
Date: Thu, 20 Aug 2009 14:55:13 +0200

> I run a couple of benchmarks with and without "precise stack scanning".
> The impact on heap usage and execution time appears to be quite small.
> Detailed results are available at:
>   https://thread.gmane.org/gmane.lisp.guile.devel/9164
> Is anyone aware of similar experiments?  It'd be nice to see if there
> are situations where it really matters.

I lost my benchmark results but my experiment result in Gauche
was similar to yours.  I imagine that the effect of precise
stack scanning is not to improve the average cases but mainly
to prevent the worst case scenario (in which large amount of
garbages are refered from unused stack area), but such scenario
rarely occurs.  The probability is not zero, however, so
in theory it is a good safety net to have.

The size of VM stack may also matter.  Gauche uses relatively
small stack (around 10K words per VM by default), since the stack
in Gauche is closer to a nursery; whenever the stack spills,
active objects are moved to the heap.   The possibility of 
excess retention grows if the VM stack gets larger.


More information about the Gc mailing list