RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v10]
Shaojin Wen
swen at openjdk.org
Tue Sep 3 10:17:40 UTC 2024
On Tue, 3 Sep 2024 09:11:06 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - code style
>> - remove unsafe
>
> src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java line 182:
>
>> 180: byte[] elems = this.elems;
>> 181:
>> 182: str.getBytes(0, countGreaterThanZero, elems, offset);
>
> Might be beneficial to non-latin1 case to move this up into the latin1 block.
>
> Could you verify the 256 limit is useful? Add a couple of cases to the micro with much longer latin1 strings; both ASCII and with non-ASCII at the end. Would be nice if we can keep this simple and the "too long" check feels a bit premature.
I verified locally that the 256 limit didn't help, so I removed it. In fact, some MethodTypeDesc may exceed 256.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1741803150
More information about the core-libs-dev
mailing list