Compiled call version seems to be slower
Ulf Zibis
Ulf.Zibis at gmx.de
Mon Nov 30 15:32:16 PST 2009
Am 30.11.2009 19:10, Tom Rodriguez schrieb:
>>>>>>> Additionally I'm wondering why the finally block is copy-and-pasted
>>>>>>> for
>>>>>>> each separate return.
>>>>>>> Is that as disired ?
>>>>>>>
>>>>>>>
>>> Sorry about asking once more. Would it be so hard to avoid the 6-times
>>> redundancy of the finally block, or are there other reasons?
>>>
>> Well, I guess no, but everyone is busy with more important stuff. But
>> hey, it's open source :-)
>>
>
> The 6 copies of the finally block are there in the bytecodes.
Yes, you are right.
> It's not something hotspot is creating. A finally is executed on every return path so a copy of that code is needed at every return. Conceivably javac could merge all the return paths through a single return with a single copy of the code but it doesn't do that.
So I should file a bug against javac ?
> You could reshape your code to look like that if you wanted to avoid multiple copies.
>
Hm, any idea how to do that ß
-Ulf
More information about the hotspot-compiler-dev
mailing list