Re: speed of invokeExact

2013-05-13 Thread Christian Thalinger
On May 10, 2013, at 1:37 AM, Jochen Theodorou wrote: > Am 10.05.2013 02:40, schrieb Christian Thalinger: > [...] >> That's because your method handle is not constant and so the compiler cannot >> inline the call. > > And you tell me that in the first case the call was inlined? No. I was refe

Re: speed of invokeExact

2013-05-10 Thread Jochen Theodorou
Am 10.05.2013 02:40, schrieb Christian Thalinger: [...] > That's because your method handle is not constant and so the compiler cannot > inline the call. If I change the test to (using 1.8.0): > Object[] os = {"str", 1, new ArrayList(), new Object()}; > MethodType invokeType = Met

Re: speed of invokeExact

2013-05-10 Thread Jochen Theodorou
Am 10.05.2013 02:40, schrieb Christian Thalinger: [...] > That's because your method handle is not constant and so the compiler cannot > inline the call. And you tell me that in the first case the call was inlined? That is unexpected. And if that is the case, then why does this: >>> Met

Re: speed of invokeExact

2013-05-09 Thread Christian Thalinger
On May 9, 2013, at 2:26 AM, Jochen Theodorou wrote: > Am 08.05.2013 23:12, schrieb John Rose: >> On May 8, 2013, at 5:33 AM, Jochen Theodorou wrote: >> >>> Am 07.05.2013 19:31, schrieb Christian Thalinger: >>> [...] Do you have any numbers?The problem is that if the MH is not constant >>>

Re: speed of invokeExact

2013-05-09 Thread Jochen Theodorou
Am 08.05.2013 23:12, schrieb John Rose: > On May 8, 2013, at 5:33 AM, Jochen Theodorou wrote: > >> Am 07.05.2013 19:31, schrieb Christian Thalinger: >> [...] >>> Do you have any numbers?The problem is that if the MH is not constant >>> we can't do any inlining and it will be an out-of-line call (

Re: speed of invokeExact

2013-05-08 Thread John Rose
On May 8, 2013, at 5:33 AM, Jochen Theodorou wrote: > Am 07.05.2013 19:31, schrieb Christian Thalinger: > [...] >> Do you have any numbers?The problem is that if the MH is not constant >> we can't do any inlining and it will be an out-of-line call (with a >> trampoline in between). Is >> your D

Re: speed of invokeExact

2013-05-08 Thread Jochen Theodorou
Am 07.05.2013 19:31, schrieb Christian Thalinger: [...] > Do you have any numbers?The problem is that if the MH is not constant > we can't do any inlining and it will be an out-of-line call (with a > trampoline in between). Is > your DMH a static or virtual? arg... looks like I made a mistake. I

Re: speed of invokeExact

2013-05-08 Thread Jochen Theodorou
please forget what I wrote... I made a mistake Am 08.05.2013 11:59, schrieb Jochen Theodorou: > Am 07.05.2013 17:42, schrieb MacGregor, Duncan (GE Energy Management): >> Which version of the jvm are you seeing this problem on, and are you >> adapting the method handle every time as well as exact i

Re: speed of invokeExact

2013-05-08 Thread Jochen Theodorou
Am 07.05.2013 17:42, schrieb MacGregor, Duncan (GE Energy Management): > Which version of the jvm are you seeing this problem on, and are you > adapting the method handle every time as well as exact invoking it? the version is a 1.8.0-ea. Since this is a generic way of method invocation I have to

Re: speed of invokeExact

2013-05-07 Thread John Rose
On May 7, 2013, at 3:44 PM, Remi Forax wrote: > I understand why you need a trampoline for a virtual call but > why do you need a trampoline for a static call ? The arguments have to be reordered, since the MH is a leading argument that must be deleted (in the case of a DMH). For compiled call

Re: speed of invokeExact

2013-05-07 Thread Remi Forax
On 05/07/2013 07:31 PM, Christian Thalinger wrote: > On May 7, 2013, at 8:04 AM, Jochen Theodorou wrote: > >> Hi, >> >> I am currently investigating here some performance issues and I may have >> found a culprint here - invokeExact. My case is one where method caching >> fails and I will have to d

Re: speed of invokeExact

2013-05-07 Thread Christian Thalinger
On May 7, 2013, at 8:04 AM, Jochen Theodorou wrote: > Hi, > > I am currently investigating here some performance issues and I may have > found a culprint here - invokeExact. My case is one where method caching > fails and I will have to do an invokeExact from Java - meaning without > the inv

Re: speed of invokeExact

2013-05-07 Thread MacGregor, Duncan (GE Energy Management)
Which version of the jvm are you seeing this problem on, and are you adapting the method handle every time as well as exact invoking it? We avoided invoke and invokeExact calls from Java (because they were sometimes painful to get correct in the case of varargs methods) by having the fallbacks ret

speed of invokeExact

2013-05-07 Thread Jochen Theodorou
Hi, I am currently investigating here some performance issues and I may have found a culprint here - invokeExact. My case is one where method caching fails and I will have to do an invokeExact from Java - meaning without the invokedynamic bytecode and with a non constant method handle. I am aw