More performance explorations

Charles Oliver Nutter headius at headius.com
Sat May 28 16:49:20 PDT 2011


On Fri, May 27, 2011 at 7:46 PM, John Rose <john.r.rose at oracle.com> wrote:
> The cure is simple:  Get rid of the interface casts implied by your uses of
> asType.  To do this, use MHs.explicitCastArguments, which does the more
> performance-friendly no-op retyping of interfaces.  If you need to cast some
> arguments and safely widen others, do it in two steps:  Pick a middle type
> that adjusts the interface arguments to Object, explicitCastArguments to
> that middle type, and then use asType the rest of the way.  (The other order
> will work too.  Don't know if there's a performance difference, but if there
> is I suspect the best order is eCA first them asType to finish.)
> How badly does this bollix up your carefully constructed code?

Well here's the thing; there are no asType calls in my code. The logic
from call site to target for these Ruby to Ruby calls looks like this:

* GWT
** test: insertArguments => dropArguments => DMH
** target: permuteArguments => insertArguments => insertArguments=> DMH

That's pretty much it. There was a convertArguments in front of the
GWT, but I think it's unnecessary and it seems to work the same
without it.

I'm double-checking everything now and will get back to you, but I'm
not sure how the logic asType logic could explain the extra stuff...

- Charlie


More information about the mlvm-dev mailing list