On Fri, 6 Oct 2023 17:06:08 GMT, Shaojin Wen 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#for
On Fri, 6 Oct 2023 14:20:13 GMT, Claes Redestad wrote:
>> Shaojin Wen 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[]` w
On Fri, 6 Oct 2023 14:20:13 GMT, Claes Redestad wrote:
> 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
> 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
On Fri, 29 Sep 2023 20:03:09 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(
On Wed, 27 Sep 2023 13:35:55 GMT, Roger Riggs wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> reduce the size of HexFormat##DIGITS, from 256 to 128
>
> It is conventional to get re-reviews of any change and give the reviewe
> 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
On Wed, 27 Sep 2023 09:07:44 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(
> 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
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:
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(
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(
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(
> 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
On Tue, 19 Sep 2023 10:41:51 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(
On Tue, 19 Sep 2023 01:35:49 GMT, 温绍锦 wrote:
>> The original (and current) is coded to avoid a condition inside the loop.
>
> I also think that the way of writing for_0 combined with if > 0 is easier to
> understand, The operation overhead of if > 0 is very small, and it will not
> affect perfo
On Tue, 19 Sep 2023 10:26:50 GMT, 温绍锦 wrote:
>> If we changed DIGITS to be encoded with the uppercase digits then the
>> expression could be simplified to
>> ```return ucase ? v : (short) (v | 0b0010__0010_); // or 0x2020```
>
> Some performance-focused scenarios, such as UUID.toString,
> 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
> 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
On Tue, 19 Sep 2023 09:34:56 GMT, Claes Redestad wrote:
>> src/java.base/share/classes/jdk/internal/util/HexDigits.java line 103:
>>
>>> 101: short v = DIGITS[i & 0xff];
>>> 102: return ucase
>>> 103: ? (short) (v - ((v & 0b0100__0100_) >> 1)) //
>>> real
On Tue, 19 Sep 2023 09:25:36 GMT, Chen Liang wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> "-" -> "& ~"
>
> src/java.base/share/classes/jdk/internal/util/HexDigits.java line 103:
>
>> 101: short v = DIGITS[i & 0x
On Tue, 19 Sep 2023 09:03:35 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(
> 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
> 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
On Mon, 18 Sep 2023 17:18:29 GMT, Roger Riggs wrote:
> > HexDecimal#DIGITS is a table with a size of 512 bytes. I think that in such
> > a table, when it needs to be used continuously, it is worthwhile to perform
> > table lookup operations.
>
> HexFormat was designed for presenting bytes to h
> 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
On Mon, 18 Sep 2023 19:08:14 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/util/HexFormat.java line 422:
>>
>>> 420: toHexDigits(out, bytes[fromIndex + i]);
>>> 421: }
>>> 422: out.append(suffix);
>>
>> Maybe change t
On Fri, 15 Sep 2023 18:04:29 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(byte[]
On Mon, 18 Sep 2023 13:40:48 GMT, Chen Liang 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#for
On Fri, 15 Sep 2023 22:19:53 GMT, 温绍锦 wrote:
> HexDecimal#DIGITS is a table with a size of 512 bytes. I think that in such a
> table, when it needs to be used continuously, it is worthwhile to perform
> table lookup operations.
HexFormat was designed for presenting bytes to humans, typical lin
On Mon, 18 Sep 2023 13:51:06 GMT, Chen Liang 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#for
On Fri, 15 Sep 2023 19:11:48 GMT, 温绍锦 wrote:
> The byte[] length used by HexFormatBench is 512. In this scenario, the
> performance improvement of using table lookup is significant.
Is this a common use-case? I could see an argument that formatting small chunks
is much more common, where users
On Fri, 15 Sep 2023 18:04:29 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(byte[]
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 t
On Fri, 15 Sep 2023 18:20:32 GMT, Claes Redestad wrote:
> What numbers do you get with this?
>
> In my experiments the improvement was either negligible or small enough to
> hardly matter. I also tried flipping bits similar to what you're doing for
> uppercasing but saw a net regression from t
On Fri, 15 Sep 2023 18:04:29 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(byte[]
On Fri, 15 Sep 2023 18:04:29 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(byte[]
37 matches
Mail list logo