John Rose skrev: >> About the slow down effect, It can be removed by allowing the two way >> (John's one and Fredrik's one) to call a method handle: >> MethodHandle.invoke() that performs a single pointer check and >> MethodHandle.apply() that performs a less restrictive/more expensive >> check. >> > > Well, that's what MHs.invoke is for! See the latest javadoc, which I > just posted: > http://cr.openjdk.java.net/~jrose/pres/indy-javadoc-b59/ > > (And, I've taken some pains to make it reasonably fast.) >
In the fast path (in the generic case) you have to do at least a single compare to verify that the method types are compatible. If they differ, then (unless you are in a real hurry throwing that WrongMethodTypeException) you could just as well try the slow case. :-) //Fredrik _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev