Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-04-25 Thread Shaojin Wen
On Fri, 26 Apr 2024 02:04:38 GMT, Joe Darcy wrote: >>> @cl4es @jddarcy All feedback has been fixed, can it be integrated? >> >> Hello @wenshao , >> >> This change will need additional review from myself or others who maintain >> BigDecimal before it can be integrated. > >> @jddarcy Sorry for

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-04-25 Thread Joe Darcy
On Tue, 19 Mar 2024 19:32:10 GMT, Joe Darcy wrote: >> I think splitting `CharArraySequence` into two versions is somewhat dubious >> as more observable types at call sites may mean the performance gain in >> targeted micros is lost. How much of an improvement did you observe from >> this?

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-04-25 Thread Shaojin Wen
On Tue, 19 Mar 2024 19:32:10 GMT, Joe Darcy wrote: >> I think splitting `CharArraySequence` into two versions is somewhat dubious >> as more observable types at call sites may mean the performance gain in >> targeted micros is lost. How much of an improvement did you observe from >> this?

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-19 Thread Raffaello Giulietti
On Tue, 19 Mar 2024 12:12:30 GMT, Shaojin Wen wrote: >> I think splitting `CharArraySequence` into two versions is somewhat dubious >> as more observable types at call sites may mean the performance gain in >> targeted micros is lost. How much of an improvement did you observe from >> this?

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-19 Thread Joe Darcy
On Tue, 12 Mar 2024 14:03:01 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restore comment > > I think splitting `CharArraySequence` into two versions is somewhat dubious > as more observable

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-19 Thread Shaojin Wen
On Tue, 12 Mar 2024 14:03:01 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restore comment > > I think splitting `CharArraySequence` into two versions is somewhat dubious > as more observable

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-12 Thread Shaojin Wen
On Tue, 12 Mar 2024 13:07:26 GMT, Shaojin Wen wrote: >> The current BigDecimal(String) constructor calls String#toCharArray, which >> has a memory allocation. >> >> >> public BigDecimal(String val) { >> this(val.toCharArray(), 0, val.length()); // allocate char[] >> } >> >> >> When the

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-12 Thread Claes Redestad
On Tue, 12 Mar 2024 13:07:26 GMT, Shaojin Wen wrote: >> The current BigDecimal(String) constructor calls String#toCharArray, which >> has a memory allocation. >> >> >> public BigDecimal(String val) { >> this(val.toCharArray(), 0, val.length()); // allocate char[] >> } >> >> >> When the

Re: RFR: 8327791: Optimization for new BigDecimal(String) [v10]

2024-03-12 Thread Shaojin Wen
> The current BigDecimal(String) constructor calls String#toCharArray, which > has a memory allocation. > > > public BigDecimal(String val) { > this(val.toCharArray(), 0, val.length()); // allocate char[] > } > > > When the length is greater than 18, create a char[] > > > boolean