RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v2]
Shaojin Wen
swen at openjdk.org
Fri Aug 30 05:24:58 UTC 2024
On Fri, 30 Aug 2024 04:41:15 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add comments
>
> src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java line 441:
>
>> 439: }
>> 440: else {
>> 441: int charLength = stringValue.length();
>
> In the slow loop, you can remove everything before the `else` - we don't really need that optimistic writing any more
The code of the slow path is complex and difficult to understand. Can the simplified work be used as a follow-up action?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1737952771
More information about the core-libs-dev
mailing list