RFR: 8339576: Speed up raw bytecode processing in ClassFile API
Chen Liang
liach at openjdk.org
Thu Sep 5 04:50:24 UTC 2024
On Thu, 5 Sep 2024 02:31:48 GMT, ExE Boss <duke at openjdk.org> wrote:
>> Currently, raw bytecode access goes through multiple wrappers, include one from ClassFile API and another ByteBuffer for merged big endian value reads. We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) for safer access.
>>
>> RawBytecodeHelper is also restructured so we avoid allocating it on the heap. Large `rawNext` method is now also inlined into the smaller `next` method.
>>
>> Current benchmark results show this significantly speeds up `jdk.classfile.Write` and some degree of speedup for simple lambda startup. The impact on general application workloads is minuscule, but this doesn't seem to bring any regression.
>>
>> Pinging @wenshao and @cl4es for review.
>
> src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java line 56:
>
>> 54:
>> 55: /**
>> 56: * The length of opcodes, 0 for
>
> What does “0 for” mean?
nothing :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20863#discussion_r1744732436
More information about the core-libs-dev
mailing list