RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v2]
Chen Liang
liach at openjdk.org
Fri Aug 30 05:33:18 UTC 2024
On Fri, 30 Aug 2024 05:21:46 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> 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?
Sure! Good to focus on the improvement here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1737960819
More information about the core-libs-dev
mailing list