RFR: 8316426: Optimization for HexFormat.formatHex [v9]

Claes Redestad redestad at openjdk.org
Fri Oct 6 14:23:04 UTC 2023


On Fri, 29 Sep 2023 20:03:09 GMT, 温绍锦 <duke at openjdk.org> wrote:

>> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table were discussed.
>> 
>> But if the input is byte[], using lookup table can improve performance.
>> 
>> For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), If the length of byte[] is larger, the performance of table lookup will be improved more obviously.
>
> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update full name

FWIW I'll not review or sponsor any PRs that use `ByteArrayLittleEndian` for trivial `byte[]` writes until there's been a thorough analysis of why this helps and shown that JITs can't be expected to generate code that is as optimal.

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

PR Comment: https://git.openjdk.org/jdk/pull/15768#issuecomment-1750762716


More information about the core-libs-dev mailing list