Performance problem with invoke dynamic

John Rose john.r.rose at oracle.com
Wed Aug 17 12:25:52 PDT 2011


On Jul 27, 2011, at 5:20 PM, Ola Bini wrote:

> I tried switching out asType to explicitCastArguments. That ended up
> being about 5% slower. 

Sorting out asType and eCA probably needs a Cookbook entry or two.  I'll post those separately.

The main differences between asType and eCA are:
 - eCA treats interfaces interchangeably with simple untyped Object refs
 - for primitives, eCA performs narrowing in addition to asType's widening
 - for primitives, eCA also interconverts between booleans and numbers
 - for primitives, eCA also unboxes nulls to zeroes (instead of asType's NPE)

In your case, eCA should not be much different from asType, so I'm surprised that it is slower.  We'll have to watch that.

But (as others have pointed out) I think your bottleneck is native calls in MH construction.  Ick.  Going away.

-- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110817/2333429e/attachment.html 


More information about the mlvm-dev mailing list