RFR: 8327791: UUID toString removes the use of ByteArrayLittleEndian

Shaojin Wen duke at openjdk.org
Sat Jun 8 02:52:41 UTC 2024


On Sat, 8 Jun 2024 00:19:55 GMT, Shaojin Wen <duke at 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.

The performance numbers under MacBookPro M1 Max are as follows: 


-Benchmark           (size)   Mode  Cnt    Score   Error   Units (#master 8ffc35d117846a7a2aa08afed662273d2f887770 )
-UUIDBench.toString   20000  thrpt   15  103.904 ? 0.772  ops/us

+Benchmark           (size)   Mode  Cnt    Score   Error   Units (# current 30373b81fddbf7e82340e466cf6425a5252399d2 )
+UUIDBench.toString   20000  thrpt   15  109.529 ? 1.156  ops/us + 5.41%

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

PR Comment: https://git.openjdk.org/jdk/pull/19610#issuecomment-2155757438


More information about the core-libs-dev mailing list