On Sun, 9 Jun 2024 07:22:39 GMT, Shaojin Wen <d...@openjdk.org> wrote:

>> After PR #16245, C2 optimizes stores into primitive arrays by combining 
>> values ​​into larger stores. In the UUID.toString method, 
>> ByteArrayLittleEndian can be removed, making the code more elegant and 
>> faster.
>
> Shaojin Wen has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - rename putHex4 to put4
>  - update copy right year

Glad to see #16245 in action, enabling simpler code with equal or better 
performance.

src/java.base/share/classes/jdk/internal/util/HexDigits.java line 123:

> 121:      * @param i to convert
> 122:      */
> 123:     public static void put4(byte[] buffer, int off, int i) {

Perhaps `index` and `value` are better names than `off` and `i`, respectively.

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

Marked as reviewed by redestad (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19610#pullrequestreview-2106355754
PR Review Comment: https://git.openjdk.org/jdk/pull/19610#discussion_r1632380045

Reply via email to