Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-27 Thread 温绍锦
On Wed, 27 Sep 2023 04:16:11 GMT, Roger Riggs wrote: > 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. If you use DIGITS of size 54, performance will be 10% slower, The code is written like this:

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-26 Thread Roger Riggs
On Tue, 19 Sep 2023 14:30:18 GMT, 温绍锦 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(

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-26 Thread 温绍锦
On Tue, 19 Sep 2023 14:30:18 GMT, 温绍锦 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(

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-26 Thread Roger Riggs
On Tue, 19 Sep 2023 14:30:18 GMT, 温绍锦 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(

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-19 Thread 温绍锦
> 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 pe