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

2023-09-03 Thread 温绍锦
On Fri, 1 Sep 2023 12:01:58 GMT, 温绍锦 wrote: >> @cl4es can you help me to review this PR? > >> @wenshao How about of approach used in [James Anhalt's >> algorithm](https://jk-jeon.github.io/posts/2022/02/jeaiii-algorithm/)? >> >> It reduces number of multiplications ([and store operations in

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

2023-09-01 Thread 温绍锦
On Thu, 31 Aug 2023 02:36:09 GMT, 温绍锦 wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> assert bounds check > > @cl4es can you help me to review this PR? > @wenshao How about of approach used in [James Anhalt's >

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

2023-09-01 Thread 温绍锦
On Thu, 31 Aug 2023 19:53:17 GMT, Claes Redestad wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> assert bounds check > > src/java.base/share/classes/java/lang/StringUTF16.java line 1585: > >> 1583:

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

2023-08-31 Thread Claes Redestad
On Tue, 18 Jul 2023 01:49:17 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 [v13]

2023-08-31 Thread Andriy Plokhotnyuk
On Thu, 31 Aug 2023 02:36:09 GMT, 温绍锦 wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> assert bounds check > > @cl4es can you help me to review this PR? @wenshao How about of approach used in James Anhalt's algorithm:

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

2023-08-31 Thread Andrew Haley
On Thu, 31 Aug 2023 14:32:43 GMT, Andrew Haley wrote: > > I'm wondering if a micro benchmark like this is very realistic. > > Exactly so! This is almost the canonical example of the "JMH considered > harmful" talk I gave recently. The subject is a joke! Yes, I love JMH, but be very careful

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

2023-08-31 Thread Andrew Haley
On Thu, 31 Aug 2023 14:15:41 GMT, John Hendrikx wrote: > I'm wondering if a micro benchmark like this is very realistic. Exactly so! This is almost the canonical example of the "JMH considered harmful" talk I gave recently. - PR Comment:

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

2023-08-31 Thread John Hendrikx
On Tue, 18 Jul 2023 01:49:17 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 [v13]

2023-08-30 Thread 温绍锦
On Tue, 18 Jul 2023 01:49:17 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 [v13]

2023-08-25 Thread 温绍锦
On Tue, 18 Jul 2023 01:49:17 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 [v13]

2023-07-27 Thread 温绍锦
On Wed, 26 Jul 2023 20:31:16 GMT, Quan Anh Mai wrote: > It could be worth it to have a cache for small integers to skip the > calculations altogether. this PR is only for calculation optimization. caching small values should be a separate PR - PR Comment:

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

2023-07-26 Thread Quan Anh Mai
On Tue, 18 Jul 2023 01:49:17 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 [v13]

2023-07-17 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*"