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

2023-09-06 Thread Claes Redestad
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-06 Thread Roger Riggs
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-06 Thread 温绍锦
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-06 Thread Quan Anh Mai
On Wed, 6 Sep 2023 16:51:51 GMT, 温绍锦 wrote: >> I'd be more comfortable replacing the use of Unsafe with either the >> ByteArray functions or VarHandles. >> Using VarHandles will enable future optimizations, whereas Unsafe is a >> primitive tool and is brittle. > >> I'd be more comfortable

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

2023-09-06 Thread 温绍锦
On Wed, 6 Sep 2023 16:10:27 GMT, Roger Riggs wrote: > I'd be more comfortable replacing the use of Unsafe with either the ByteArray > functions or VarHandles. Using VarHandles will enable future optimizations, > whereas Unsafe is a primitive tool and is brittle. I also agree that using

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

2023-09-06 Thread Roger Riggs
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-06 Thread Claes Redestad
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-06 Thread 温绍锦
On Wed, 6 Sep 2023 10:20:17 GMT, Quan Anh Mai wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> update copyright date info > > We can consolidate the implementation of `Integer::toString` and > `Integer::toUnsignedString`

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

2023-09-06 Thread 温绍锦
On Wed, 6 Sep 2023 10:20:17 GMT, Quan Anh Mai wrote: > We can consolidate the implementation of `Integer::toString` and > `Integer::toUnsignedString` by taking the absolute value of the signed > integer and move the later operation to unsigned domain. This helps remove > the need of relying

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

2023-09-06 Thread Quan Anh Mai
On Tue, 5 Sep 2023 00:10:12 GMT, 温绍锦 wrote: >> Optimization for: >> Integer.toString >> Long.toString >> StringBuilder#append(int) >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test

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

2023-09-04 Thread 温绍锦
> Optimization for: > Integer.toString > Long.toString > StringBuilder#append(int) > > # Benchmark Result > > > sh make/devkit/createJMHBundle.sh > bash configure --with-jmh=build/jmh/jars > make test TEST="micro:java.lang.Integers.toString*" > make test TEST="micro:java.lang.Longs.toString*"