Inlining of MethodHandles chain possible/planned?

Rémi Forax forax at univ-mlv.fr
Wed May 18 12:29:25 PDT 2011


On 05/18/2011 09:03 PM, John Rose wrote:
> On May 18, 2011, at 11:59 AM, Rémi Forax wrote:
>
>> All others are hard because the value of the method handle is not
>> statically known
>> i.e the method handle cannot be considered as constant.
> It can be optimistically inlined, which is what we do for invokedynamic instructions.

This is exactly what the backport does now, it inlines a method handle
if it's the same method handle during the profiling phase but thei 
strategy doesn't work well.
I've taken some benchmarks that use lambdas (some from JRuby, some from
a proprietary language) and translate them in PHP.reboot.
In only one bench, the method handle was stable.

The solution proposed by Cliff Click, a dispatch table at the start of 
the method/loop, seems better

> -- John

Rémi



More information about the mlvm-dev mailing list