RFR: 8316426: Optimization for HexFormat.formatHex [v7]
Roger Riggs
rriggs at openjdk.org
Wed Sep 27 04:19:15 UTC 2023
On Tue, 19 Sep 2023 14:30:18 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:
>
> fix typo
ok, but perhaps you can shrink it further, if it does not hurt performance, by subtracting 0x20 before indexing and cut the table to 64 bytes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15768#issuecomment-1736644966
More information about the core-libs-dev
mailing list