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(int) and >> Long#toString. >>

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

2023-06-29 Thread Glavo
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(int) and >> Long#toString. >>

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

2023-06-29 Thread Glavo
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(int) and >> Long#toString. >>

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: > >> 476: >> 477: byte[

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

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:j