megamorphic lambda prevention
Jochen Theodorou
blackdrag at gmx.org
Thu Jun 21 07:16:14 PDT 2012
Am 21.06.2012 15:55, schrieb Jochen Theodorou:
> Am 21.06.2012 13:21, schrieb MacGregor, Duncan (GE Energy):
>> Yes, it is very easy for those sites to become megamorphic. We work round
>> this by using exactInvokers on function invocation call sites, and caching
>> on the method type of the functions rather than the types.
>
> So in my own words... you don't check on the type of the lambda, but on
> what it takes as input, thus you get no changes for differing lambdas.
> Is that about right? That's a nice idea, indeed
actually I am wondering... I guess I didn't fully understand yet, since
even if you avoid the call site invalidation that way, you still have
kind of a "branch point" the JIT will not inline. What it can inline is
everything till the actual invocation, then it ends, since there are
different MethodHandles involved.
bye Jochen
--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org
More information about the mlvm-dev
mailing list