More performance explorations
Tom Rodriguez
tom.rodriguez at oracle.com
Fri Jun 3 11:01:19 PDT 2011
On Jun 3, 2011, at 12:12 AM, Charles Oliver Nutter wrote:
> I did make another small discovery: the + calls never inline
> completely. They eventually are a virtual invocation of
> RubyFixnum.op_plus, and in both old and new builds they're calls in
> the asm.
That's not what I see when I run it. RubyFixnum::op_plus is always inlined in the runs I do.
>
> This makes me wonder if Rémi was right about userland virtual
> invocations never inlining at the end of a method handle chain. Can
> that truly be the case? If so, it would mean most of JRuby's core
> class methods won't inline...a sad state of affairs :(
The current machinery should do the same inlining that it would have done if there were a direct call instead of a method handle invoke. Basically the call site has frequency information that drives our more aggressive inlining and that is propagated through the method to the final call. So if the method handle is hot then the final call will be too.
Don't get sad just yet. 7 won't perform as well as it might but we should be able to fix the performance issues in the updates. Once the core implementation is ironed out we can optimize to our hearts content and there no problem getting that into update releases.
tom
>
> - Charlie
>
> On Fri, Jun 3, 2011 at 1:40 AM, Charles Oliver Nutter
> <headius at headius.com> wrote:
>> On Fri, Jun 3, 2011 at 1:39 AM, Charles Oliver Nutter
>> <headius at headius.com> wrote:
>>> Ok, I may have gotten confused a bit but the back-and-forth about
>>> where an interface cast would be forced and where it would not.
>>
>> ...confused a bit BY the back-and-forth...
>>
>> - Charlie
>>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
More information about the mlvm-dev
mailing list