RFR: 8353741: Improve UUID.toString performance by using SIMD within a register instead of table lookup [v3]

Shaojin Wen swen at openjdk.org
Tue Apr 8 01:11:17 UTC 2025


On Sat, 5 Apr 2025 05:30:25 GMT, Shaojin Wen <swen at openjdk.org> wrote:

>> Improve the performance of UUID::toString by using Long.expand and SWAR (SIMD within a register) instead of table lookup. Eliminating the table lookup can also avoid the performance degradation problem when the cache misses.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   simplify code

https://github.com/wenshao/jdk/tree/optim_uuid_to_string_202501_x2

I also made a version that does not use ByteArrayLittleEndian, but the performance drops by 5% to 10%. By printing the igv file through PrintIdealGraph, I found that the RangeCheck of array access is not eliminated.

[pr_22928_igv.zip](https://github.com/user-attachments/files/19640905/pr_22928_igv.zip)

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

PR Comment: https://git.openjdk.org/jdk/pull/22928#issuecomment-2784980276


More information about the core-libs-dev mailing list