RFR: 8339576: Speed up raw bytecode processing in ClassFile API
Shaojin Wen
swen at openjdk.org
Thu Sep 5 14:06:50 UTC 2024
On Thu, 5 Sep 2024 13:40:51 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> C2 needs 10000 calls to inline this method, so wenshao is worried. However, this method call is almost always followed by a huge switch to handle different opcode, so I doubt how much of a difference inlining brings.
>>
>> But wenshao discovered that this method has too many field gets; I should indeed convert them to local variable access if possible.
>
> Yes, things like storing `endBci()` to a local variable can be great if it both reduces code size and improves interpreter/C1 speed - but don't over-do it as it's likely never-ending work for a kind of optimizations leyden might make pointless.
It is not necessary to use RawBytecodeHelper in the StackMapGenerator#detectFrameOffsets method. It may be better to operate directly on the `byte[] bytecode`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20863#discussion_r1745608455
More information about the core-libs-dev
mailing list