RFR: 8310502 : optimization for UUID#toString

2023-06-21 Thread
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

Re: RFR: 8310502 : optimization for UUID#toString

2023-06-21 Thread
On Wed, 21 Jun 2023 07:58:11 GMT, Alan Bateman 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 Mo

Re: RFR: 8310502 : optimization for UUID#toString

2023-06-21 Thread
On Wed, 21 Jun 2023 08:58:53 GMT, Chen Liang wrote: > > Another thing to try is moving fastUUID out of Long - moving to an array of > > precomputed hex values means it is not tied to Long internals anymore. > > A note about `@Stable`: `Integer.digits` and `HEX256` are not, and they might > see

Re: RFR: 8310502 : optimization for UUID#toString [v2]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: 8310502 : HEX256 initialization use constant val

Re: RFR: 8310502 : optimization for UUID#toString [v3]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: 8310502 : hex literal -

Re: RFR: 8310502 : optimization for UUID#toString [v3]

2023-06-21 Thread
On Wed, 21 Jun 2023 11:06:08 GMT, 温绍锦 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: >> >> Ben

Re: RFR: 8310502 : optimization for UUID#toString [v4]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: add annotation Stable -

Re: RFR: 8310502 : optimization for UUID#toString [v5]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: simplify code - Changes: - all: htt

Re: RFR: 8310502 : optimization for UUID#toString [v6]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: import ByteOrder - Changes: - all:

Re: RFR: 8310502 : optimization for UUID#toString [v4]

2023-06-21 Thread
On Wed, 21 Jun 2023 19:02:59 GMT, ExE Boss wrote: >> src/java.base/share/classes/java/lang/Long.java line 563: >> >>> 561: StringUTF16.putChar(buf, 7, (byte) i3); >>> 562: StringUTF16.putChar(buf, 8, '-'); >>> 563: StringUTF16.putChar(buf, 9, (byte) (i4 >> 8))

Re: RFR: 8310502 : optimization for UUID#toString [v7]

2023-06-21 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: move HEX256 to LongCache -

Re: RFR: 8310502 : optimization for UUID#toString [v7]

2023-06-21 Thread
On Wed, 21 Jun 2023 15:21:45 GMT, Roger Riggs wrote: > CDS can initialize arrays efficiently. The Long class already uses CDS to > initialize the cache of Long values. See the LongCache code for an example of > initializing from CDS with a fallback to direct initialization. You could > move th

Re: RFR: 8310502 : optimization for UUID#toString [v3]

2023-06-21 Thread
On Wed, 21 Jun 2023 13:32:32 GMT, 温绍锦 wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> 8310502 : hex literal > > * benchmark code > https://github.com/wenshao/jdk_8310502_test/blob/main/

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

2023-06-21 Thread
On Thu, 22 Jun 2023 01:03:11 GMT, Roger Riggs wrote: > fyi, the title of this PR need to match exactly the title of the bug > [JDK-8310502](https://bugs.openjdk.org/browse/JDK-8310502). The mismatch is > an Integration blocker. (See the comment in the description). i have made the changes. is

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: fix compile error - Changes: - all:

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

2023-06-22 Thread
On Thu, 22 Jun 2023 07:16:25 GMT, 温绍锦 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: >> >> Ben

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: use single holder class cache HEX256 ---

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

2023-06-22 Thread
On Thu, 22 Jun 2023 05:48:34 GMT, Alan Bateman wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> move HEX256 to LongCache > > src/java.base/share/classes/java/lang/Long.java line 1233: >

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: fix compile error - Changes: - all:

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: use ByteArray for COMPACT_STRINGS disable ---

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: revert to non-ByteArray -

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: use ByteArray & simplify code --

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: use ByteArray.setInt & setLong --

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: make fastUUID codeSize less

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: add import & rename HEX to H256 --

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: format code - Changes: - all: htt

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

2023-06-22 Thread
On Thu, 22 Jun 2023 21:44:12 GMT, 温绍锦 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: >> >> Ben

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: remove Arrays.fill -

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

2023-06-22 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: remove unused import -

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

2023-06-22 Thread
On Fri, 23 Jun 2023 04:22:07 GMT, 温绍锦 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: >> >> Ben

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

2023-06-23 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: make Long.fastUUID codeSize less

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

2023-06-23 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: format code - Changes: - all: htt

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

2023-06-23 Thread
On Fri, 23 Jun 2023 19:30:31 GMT, ExE Boss wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> format code > > src/java.base/share/classes/java/lang/Long.java line 493: > >> 491:

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

2023-06-25 Thread
On Fri, 23 Jun 2023 04:52:16 GMT, 温绍锦 wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> remove unused import > > Latest benchmark results (commit id > [0d34655](https://github.c

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

2023-06-25 Thread
On Sun, 25 Jun 2023 05:49:09 GMT, Alan Bateman wrote: >> Latest benchmark results (commit id >> [0d34655](https://github.com/openjdk/jdk/pull/14578/commits/0d346558e00cfab899e435acd0eb83d39d5b7169) >> ): >> >> * >> [aliyun_c8i.xlarge](https://help.aliyun.com/document_detail/25378.html#c8i) >

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

2023-06-25 Thread
On Fri, 23 Jun 2023 11:24:23 GMT, 温绍锦 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: >> >> Ben

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

2023-06-25 Thread
On Sun, 25 Jun 2023 05:49:09 GMT, Alan Bateman wrote: >> Latest benchmark results (commit id >> [0d34655](https://github.com/openjdk/jdk/pull/14578/commits/0d346558e00cfab899e435acd0eb83d39d5b7169) >> ): >> >> * >> [aliyun_c8i.xlarge](https://help.aliyun.com/document_detail/25378.html#c8i) >

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

2023-06-25 Thread
On Sun, 25 Jun 2023 05:49:09 GMT, Alan Bateman wrote: >> Latest benchmark results (commit id >> [0d34655](https://github.com/openjdk/jdk/pull/14578/commits/0d346558e00cfab899e435acd0eb83d39d5b7169) >> ): >> >> * >> [aliyun_c8i.xlarge](https://help.aliyun.com/document_detail/25378.html#c8i) >

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

2023-06-25 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: add jdk.util.HexDigits, sharing cache array

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

2023-06-25 Thread
On Sun, 25 Jun 2023 16:20:15 GMT, ExE Boss wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> add jdk.util.HexDigits, sharing cache array across multiple classes, >> including

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

2023-06-25 Thread
On Sun, 25 Jun 2023 16:48:06 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/lang/Long.java line 451: >> >>> 449: } >>> 450: >>> 451: static String fastUUID(long lsb, long msb) { >> >> This method should probably have an asse

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

2023-06-25 Thread
On Sun, 25 Jun 2023 12:20:17 GMT, 温绍锦 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: >> >> Ben

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

2023-06-25 Thread
On Sun, 25 Jun 2023 12:20:17 GMT, 温绍锦 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: >> >> Ben

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

2023-06-25 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: move fastUUID implementation to UUID.toString

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

2023-06-25 Thread
On Sun, 25 Jun 2023 16:09:51 GMT, Alan Bateman wrote: >> @AlanBateman i have modified according to liach's suggestion, it's ready for >> review also. > >> @wenshao I don't think this is feasible, for this uses a new feature and >> hampers backport to jdk11. > > I don't think backporting should

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

2023-06-25 Thread
On Sun, 25 Jun 2023 20:19:58 GMT, Andrey Turbanov wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> remove JavaLangAccess#fastUUID > > src/java.base/share/classes/java/util/UUID.java line 466: &

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

2023-06-25 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: remove JavaLangAccess#fastUUID -

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

2023-06-25 Thread
On Sun, 25 Jun 2023 16:09:51 GMT, Alan Bateman wrote: >> @AlanBateman i have modified according to liach's suggestion, it's ready for >> review also. > >> @wenshao I don't think this is feasible, for this uses a new feature and >> hampers backport to jdk11. > > I don't think backporting should

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

2023-06-26 Thread
On Mon, 26 Jun 2023 09:26:02 GMT, Andrey Turbanov wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> remove JavaLangAccess#fastUUID > > src/java.base/share/classes/java/util/UUID.java line 515: &

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

2023-06-26 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: use ISO_8859_1.INSTANCE directly instead of Sta

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

2023-06-26 Thread
On Mon, 26 Jun 2023 09:57:31 GMT, 温绍锦 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: >> >> Ben

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

2023-06-26 Thread
On Mon, 26 Jun 2023 09:57:31 GMT, 温绍锦 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: >> >> Ben

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

2023-06-26 Thread
On Mon, 26 Jun 2023 09:57:31 GMT, 温绍锦 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: >> >> Ben

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

2023-06-27 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: fix UUID.java import, rename jdk.util.HexDigits to

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

2023-06-27 Thread
On Tue, 27 Jun 2023 10:08:32 GMT, Chen Liang wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> use ISO_8859_1.INSTANCE directly instead of StandardCharsets.ISO_8859_1 > > src/java.base/share/cl

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

2023-06-27 Thread
On Mon, 26 Jun 2023 09:57:31 GMT, 温绍锦 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: >> >> Ben

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

2023-06-27 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/jdk/internal/

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

2023-06-27 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: change copyright years, and rename jdk

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

2023-06-27 Thread
On Tue, 27 Jun 2023 14:32:14 GMT, Glavo wrote: >> On second thought, we should be able to create a getter like >> >> @ForceInline >> static short hex256(int byteValue) { >> return HEX256[byteValue]; >> } >> >> and switch usages to that getter instead. This is a better approach than >> clon

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

2023-06-27 Thread
On Tue, 27 Jun 2023 13:54:43 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix UUID.java import, rename jdk.util.HexDigits to jdk.util.Hex256 and >> make private constr

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

2023-06-27 Thread
On Tue, 27 Jun 2023 16:35:20 GMT, Alan Bateman wrote: > > Wenshao hopes to use this array for other optimizations in `java.lang` in > > the future. > > But as for this PR, I suggest wenshao not to do so much. I suggest moving > > `DIGITS` back to `HexDigits` first to make the modifications in t

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

2023-06-27 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: revert to HexDigits.DIGITS, keep this

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

2023-06-27 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: remove unused import, and fix comment ---

RFR: 8310929: Optimization for Integer.toString

2023-06-28 Thread
Speed up Integer.toString with a precomputed cache array of length 1000, use division by 1000, so that each iteration can calculate three digits. this optimization can also be used in StringBuilder#appent(int) and Long#toString. # Benchmark Result make test TEST="micro:java.lang.Integers.to

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-28 Thread
) Mode Cnt Score Error Units (PR) > +Integers.toStringBig 500 avgt 15 8.157 ± 0.274 us/op +48.10% > +Integers.toStringSmall 500 avgt 15 7.207 ± 0.330 us/op -1.22% > +Integers.toStringTiny 500 avgt 15 6.912 ± 0.199 us/op -8.52% 温绍锦 has updated the pull req

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-28 Thread
On Wed, 28 Jun 2023 17:53:04 GMT, Raffaello Giulietti wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> postpone the division > > src/java.base/share/classes/java/lang/Integer.java line 478: &g

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

2023-06-28 Thread
On Tue, 27 Jun 2023 16:12:50 GMT, 温绍锦 wrote: >>> Sadly, jdk.internal.util is exported to other modules so it does need to be >>> looked at from an integrity perspective. >> >> This is indeed a problem to consider. >> >> Maybe we can move this array b

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

2023-06-28 Thread
On Tue, 27 Jun 2023 14:10:45 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix UUID.java import, rename jdk.util.HexDigits to jdk.util.Hex256 and >> make private constr

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

2023-06-29 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: revert HexDigits.DIGITS private -

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

2023-06-29 Thread
On Thu, 29 Jun 2023 08:46:32 GMT, 温绍锦 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: >> >> Ben

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

2023-06-29 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: code format - Changes: - all: htt

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

2023-06-29 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with one additional commit since the last revision: code format & comments add endianness ---

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

2023-06-29 Thread
Error Units > UUIDUtilsBenchmark.new thrpt5 92676.550 ± 292.213 ops/ms > UUIDUtilsBenchmark.original thrpt5 37040.165 ± 1023.532 ops/ms 温绍锦 has updated the pull request incrementally with two additional commits since the last revision: - fix comments typo - Update full name ---

Integrated: JDK-8310502 : Optimization for j.l.Long.fastUUID()

2023-06-29 Thread
On Wed, 21 Jun 2023 07:28:54 GMT, 温绍锦 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

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-29 Thread
On Wed, 28 Jun 2023 22:19:04 GMT, 温绍锦 wrote: >> Speed up Integer.toString with a precomputed cache array of length 1000, use >> division by 1000, so that each iteration can calculate three digits. >> >> this optimization can also be used in StringBuilder#appent(in

Re: RFR: 8310929: Optimization for Integer.toString [v3]

2023-06-29 Thread
op > -Integers.toStringTiny 500 avgt 15 6.323 ± 0.239 us/op > > +Benchmark (size) Mode Cnt Score Error Units (PR > commit-id 3355d211) > +Integers.toStringBig 500 avgt 15 8.279 ± 0.184 us/op (+45.92%) > +Integers.toStringSmall 500 avg

Re: RFR: 8310929: Optimization for Integer.toString [v4]

2023-06-29 Thread
chmark (size) Mode Cnt Score Error Units (PR Update > 02 62b499d6) > +Integers.toStringBig 500 avgt 15 5.493 ± 0.007 us/op (+23.10%) > +Integers.toStringSmall 500 avgt 15 3.714 ± 0.006 us/op (+20.65%) > +Integers.toStringTiny 500 avgt 15 2.786 ± 0.015 us/o

Re: RFR: 8310929: Optimization for Integer.toString [v5]

2023-06-29 Thread
chmark (size) Mode Cnt Score Error Units (PR Update > 02 62b499d6) > +Integers.toStringBig 500 avgt 15 5.493 ± 0.007 us/op (+23.10%) > +Integers.toStringSmall 500 avgt 15 3.714 ± 0.006 us/op (+20.65%) > +Integers.toStringTiny 500 avgt 15 2.786 ± 0.015 us/o

Re: RFR: 8310929: Optimization for Integer.toString [v5]

2023-06-30 Thread
On Fri, 30 Jun 2023 06:26:53 GMT, 温绍锦 wrote: >> Optimization for: >> >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundl

Re: RFR: 8310929: Optimization for Integer.toString [v6]

2023-06-30 Thread
500 avgt 15 6.753 ± 0.007 us/op > -Integers.toStringSmall 500 avgt 15 4.470 ± 0.005 us/op > -Integers.toStringTiny 500 avgt 15 2.764 ± 0.020 us/op > > -Benchmark(size) Mode Cnt Score Error Units (baseline) > -Longs.toStringBig

Re: RFR: 8310929: Optimization for Integer.toString [v7]

2023-06-30 Thread
500 avgt 15 6.753 ± 0.007 us/op > -Integers.toStringSmall 500 avgt 15 4.470 ± 0.005 us/op > -Integers.toStringTiny 500 avgt 15 2.764 ± 0.020 us/op > > -Benchmark(size) Mode Cnt Score Error Units (baseline) > -Longs.toStringBig

Re: RFR: 8310929: Optimization for Integer.toString [v8]

2023-06-30 Thread
0 avgt 15 6.753 ± 0.007 us/op > -Integers.toStringSmall 500 avgt 15 4.470 ± 0.005 us/op > -Integers.toStringTiny 500 avgt 15 2.764 ± 0.020 us/op > > +Benchmark (size) Mode Cnt Score Error Units (PR Update > 04 f4aa1989) > +Integers.toStrin

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

2023-06-30 Thread
On Thu, 29 Jun 2023 13:45:09 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with two additional commits >> since the last revision: >> >> - fix comments typo >> - Update full name > > src/java.base/share/classes/java/uti

RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
[PR 14578 ](https://github.com/openjdk/jdk/pull/14578) still has unresolved discussions, continue to make improvements. # Benchmark Result sh make/devkit/createJMHBundle.sh bash configure --with-jmh=build/jmh/jars make test TEST="micro:java.util.UUIDBench.toString" ## 1. [aliyun_ecs_c8i.xlar

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

2023-06-30 Thread
On Sat, 1 Jul 2023 00:01:57 GMT, Jie Fu wrote: >> can you create a new issue and i continue improving? > >> can you create a new issue and i continue improving? > > Filed: https://bugs.openjdk.org/browse/JDK-8311207 @liach @RogerRiggs continue discussion in [PR 14745](https://github.com/openjd

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 02:09:36 GMT, Chen Liang wrote: > Is using `Unsafe` directly consistently faster than using ByteArray? It > should have similar performance as ByteArray's VarHandle is simply a wrapper > around Unsafe's put/get methods. Using Unsafe on aliyun_ecs_c8i.xlarge and MacBookPro M1

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 01:44:15 GMT, 温绍锦 wrote: > [PR 14578 ](https://github.com/openjdk/jdk/pull/14578) still has unresolved > discussions, continue to make improvements. > > # Benchmark Result > > > sh make/devkit/createJMHBundle.sh > bash configure --with-jmh=build/j

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v2]

2023-06-30 Thread
(+7.17%) > > > ## 5. Orange Pi 5 Plus > > ``` diff > -Benchmark (size) Mode Cnt Score Error Units (baseline) > -UUIDBench.toString 20000 thrpt 15 33.532 ± 0.396 ops/us > > +Benchmark (size) Mode Cnt Score Error Units (PR) > +UU

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 02:40:22 GMT, 温绍锦 wrote: >> [PR 14578 ](https://github.com/openjdk/jdk/pull/14578) still has unresolved >> discussions, continue to make improvements. >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >>

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 03:06:31 GMT, Chen Liang wrote: >> ![image](https://github.com/openjdk/jdk/assets/1166785/38c75145-b685-4c4e-a53a-97f8c44778e3) >> >> it's enabled > >> > @wenshao I have made my suggestions into a patch for you: >> > [wenshao#1](https://github.com/wenshao/jdk/pull/1) Feel fre

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v3]

2023-06-30 Thread
(+7.17%) > > > ## 5. Orange Pi 5 Plus > > ``` diff > -Benchmark (size) Mode Cnt Score Error Units (baseline) > -UUIDBench.toString 20000 thrpt 15 33.532 ± 0.396 ops/us > > +Benchmark (size) Mode Cnt Score Error Units (PR) &g

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 03:06:31 GMT, Chen Liang wrote: >> ![image](https://github.com/openjdk/jdk/assets/1166785/38c75145-b685-4c4e-a53a-97f8c44778e3) >> >> it's enabled > >> > @wenshao I have made my suggestions into a patch for you: >> > [wenshao#1](https://github.com/wenshao/jdk/pull/1) Feel fre

Re: RFR: 8311207: Optimization for j.u.UUID.toString

2023-06-30 Thread
On Sat, 1 Jul 2023 03:06:31 GMT, Chen Liang wrote: >> ![image](https://github.com/openjdk/jdk/assets/1166785/38c75145-b685-4c4e-a53a-97f8c44778e3) >> >> it's enabled > >> > @wenshao I have made my suggestions into a patch for you: >> > [wenshao#1](https://github.com/wenshao/jdk/pull/1) Feel fre

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v4]

2023-07-01 Thread
(+7.17%) > > > ## 5. Orange Pi 5 Plus > > ``` diff > -Benchmark (size) Mode Cnt Score Error Units (baseline) > -UUIDBench.toString 20000 thrpt 15 33.532 ± 0.396 ops/us > > +Benchmark (size) Mode Cnt Score Error Units (PR) > +U

Re: RFR: 8310929: Optimization for Integer.toString [v9]

2023-07-01 Thread
0 avgt 15 6.753 ± 0.007 us/op > -Integers.toStringSmall 500 avgt 15 4.470 ± 0.005 us/op > -Integers.toStringTiny 500 avgt 15 2.764 ± 0.020 us/op > > +Benchmark (size) Mode Cnt Score Error Units (PR Update > 04 f4aa1989) > +Integers.toStrin

Re: RFR: 8310929: Optimization for Integer.toString [v10]

2023-07-01 Thread
0 avgt 15 6.753 ± 0.007 us/op > -Integers.toStringSmall 500 avgt 15 4.470 ± 0.005 us/op > -Integers.toStringTiny 500 avgt 15 2.764 ± 0.020 us/op > > +Benchmark (size) Mode Cnt Score Error Units (PR Update > 04 f4aa1989) > +Integers.toStrin

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v5]

2023-07-01 Thread
(+7.17%) > > > ## 5. Orange Pi 5 Plus > > ``` diff > -Benchmark (size) Mode Cnt Score Error Units (baseline) > -UUIDBench.toString 20000 thrpt 15 33.532 ± 0.396 ops/us > > +Benchmark (size) Mode Cnt Score Error Units (PR) > +UUI

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v6]

2023-07-01 Thread
(+7.17%) > > > ## 5. Orange Pi 5 Plus > > ``` diff > -Benchmark (size) Mode Cnt Score Error Units (baseline) > -UUIDBench.toString 20000 thrpt 15 33.532 ± 0.396 ops/us > > +Benchmark (size) Mode Cnt Score Error U

Re: RFR: 8310929: Optimization for Integer.toString [v10]

2023-07-01 Thread
On Sun, 2 Jul 2023 01:27:26 GMT, Chen Liang wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> use upper case for static final field > > src/java.base/share/classes/java/lang/StringUT

Re: RFR: 8310929: Optimization for Integer.toString [v10]

2023-07-01 Thread
On Sun, 2 Jul 2023 02:05:48 GMT, Chen Liang wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> use upper case for static final field > > src/java.base/share/classes/java/lang/StringUTF16.java lin

  1   2   3   4   >