RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v10]

Claes Redestad redestad at openjdk.org
Tue Sep 3 09:26:24 UTC 2024


On Tue, 3 Sep 2024 08:54:39 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
>
> test/micro/org/openjdk/bench/java/lang/classfile/Utf8EntryWriteTo.java line 76:
> 
>> 74:         byte[] bytes = HexFormat.of().parseHex(
>> 75:                 switch (charType) {
>> 76:                     case "ascii"        -> "78";
> 
> Might be good to randomize these inputs a bit.

I also note that all Strings are the same length. With vectorization on the table we'd want to test a healthy mix of strings of various lengths. @liach also suggested somewhere that strings which have a leading ASCII substring then a non-ASCII somewhere in the middle or near the end had a regression in an earlier iteration. It would be good to have a micro test for such strings.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1741732133


More information about the core-libs-dev mailing list