RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v17]

温绍锦 duke at openjdk.org
Thu Jun 22 22:16:09 UTC 2023


On Thu, 22 Jun 2023 21:44:12 GMT, 温绍锦 <duke at openjdk.org> wrote:

>> By optimizing the implementation of java.lang.Long#fastUUID, the performance of the java.util.UUID#toString method can be significantly improved.
>> 
>> The following are the test results of JMH: 
>> 
>> Benchmark                     Mode  Cnt      Score      Error   Units
>> UUIDUtilsBenchmark.new       thrpt    5  92676.550 ±  292.213  ops/ms
>> UUIDUtilsBenchmark.original  thrpt    5  37040.165 ± 1023.532  ops/ms
>
> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   format code

Latest benchmark results:

* aliyun_c8i.xlarge (+23.25%)
cpu intel xeon sapphire rapids (x64)
``` diff
 Benchmark           (size)   Mode  Cnt   Score   Error   Units
-UUIDBench.toString   20000  thrpt   15  62.457 ± 0.226  ops/us
+UUIDBench.toString   20000  thrpt   15  76.979 ± 1.011  ops/us


* aliyun_c8a.xlarge (+29.93%)
cpu amd epc genoa (x64)
``` diff
 Benchmark           (size)   Mode  Cnt   Score   Error   Units
-UUIDBench.toString   20000  thrpt   15  65.673 ± 0.110  ops/us
+UUIDBench.toString   20000  thrpt   15  85.331 ± 0.181  ops/us


* aliyun_c8y.xlarge (+29.06%)
cpu aliyun yitian 710 (aarch64)
``` diff
 Benchmark           (size)   Mode  Cnt   Score   Error   Units
-UUIDBench.toString   20000  thrpt   15  32.198 ± 0.907  ops/us
+UUIDBench.toString   20000  thrpt   15  41.555 ± 0.963  ops/us


* aws_c5.xlarge (+35.29%)
``` diff
 Benchmark           (size)   Mode  Cnt   Score   Error   Units
-UUIDBench.toString   20000  thrpt   15  46.003 ± 0.291  ops/us
+UUIDBench.toString   20000  thrpt   15  62.239 ± 0.072  ops/us

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

PR Comment: https://git.openjdk.org/jdk/pull/14578#issuecomment-1603379671


More information about the core-libs-dev mailing list