TaggedArrays
Charles Oliver Nutter
headius at headius.com
Wed Sep 12 19:35:42 PDT 2012
On Wed, Sep 12, 2012 at 9:06 PM, Charles Oliver Nutter
<headius at headius.com> wrote:
> This is very illustrative, thank you! I never got around to commenting
> on your original email, so I'm taking some time now (I'm also doing a
> talk on "high performance Ruby" at Golden Gate RubyConf on Friday, so
> I'm looking at perf and numbers again).
Another problem/question/snag: clearing references?
By maintaining an artificial stack, we also incur the cost of clearing
references on exit from each method. My exploration with JRuby has
shown that reference-nulling accounts for a *substantial* part of the
overhead of methods that require an artificial frame. JRuby already
does have an artificial stack we use for methods we expect to need it,
and even for methods that do nothing but clear that frame (and don't
actually use it) the hit is pretty substantial...in my measurements,
along with the cost of setting up the frame (we have to set a number
of values whether they're used or not) clearing the frame on exit is
approximately 1/3 of artificial stack overhead.
This is another place where being able to use JVM stack would be far
better, since the JVM already handles GC-related stack effects for us.
Thoughts? I assume where you are using TaggedArray you are clearing
stack elements on method exit, right?
- Charlie
More information about the mlvm-dev
mailing list