More performance explorations
Rémi Forax
forax at univ-mlv.fr
Fri Jun 3 06:29:59 PDT 2011
On 06/03/2011 04:37 AM, John Rose wrote:
> Thanks; I'll look at your dump later tonight.
>
> If the problem is friction from interface casts, we can probably
> remove them. It's hard to figure out how they are getting in, though.
> It happens when IRubyObject interconverts with Object. Are you doing
> it, or is it coming from inside the java.lang.invoke classes? That's
> the first question. It probably comes from an asType, but some asType
> calls are implicit within the 292 API. What asType calls
> (was convertArguments) are in your code?
>
> Key fact: asType/convertArguments used to allow interfaces a free
> unchecked pass into and out of Object. Now only explicitCastArguments
> does this. If you convert between an interface and Object, you'll get
> a real checkcast (and a potential CCE) from asType.
>
> Try changing convertArguments globally to explicitCastArguments and
> see what happens.
Semantically there aren't equivalent but it should not be a problem
if you don't use asType to do an unboxing conversions
e.g. Integer or Object -> int
if the object is null asType throws a NPE but explicitCastArguments
returns 0.
>
> -- John
Rémi
More information about the mlvm-dev
mailing list