Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-26 Thread Raffaello Giulietti
On Wed, 26 Jun 2024 13:20:58 GMT, Shaojin Wen wrote: >> In principle, you should not arbitrarily change code that is correct, and >> only limit your changes to reach the goal of the PR. >> My suggestion is the minimal change required, yours is more than strictly >> needed. > > Got it, should I

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-26 Thread Shaojin Wen
On Wed, 26 Jun 2024 12:50:38 GMT, Raffaello Giulietti wrote: >> I like the new implementation, the code is cleaner, is your suggestion to >> revert to the original version due to smaller changes? > > In principle, you should not arbitrarily change code that is correct, and > only limit your ch

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-26 Thread Raffaello Giulietti
On Tue, 25 Jun 2024 17:02:10 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/math/DoubleToDecimal.java line 236: >> >>> 234: dk = -1; >>> 235: } >>> 236: return toDecimal(str, index, Q_MIN, t, dk, fd) - start; >> >> I sugge

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-25 Thread Shaojin Wen
On Tue, 25 Jun 2024 14:47:45 GMT, Raffaello Giulietti wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Utf16 case remove `append first utf16 char` > > src/java.base/share/classes/jdk/internal/math/DoubleToDecimal.ja

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-25 Thread Raffaello Giulietti
On Mon, 17 Jun 2024 04:58:41 GMT, Shaojin Wen wrote: >> The current versions of FloatToDecimal and DoubleToDecimal allocate >> additional objects. Reducing these allocations can improve the performance >> of Float/Double.toString and AbstractStringBuilder's append(float/double). >> >> This pat

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-24 Thread Chen Liang
On Mon, 17 Jun 2024 04:58:41 GMT, Shaojin Wen wrote: >> The current versions of FloatToDecimal and DoubleToDecimal allocate >> additional objects. Reducing these allocations can improve the performance >> of Float/Double.toString and AbstractStringBuilder's append(float/double). >> >> This pat

Re: RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]

2024-06-16 Thread Shaojin Wen
> The current versions of FloatToDecimal and DoubleToDecimal allocate > additional objects. Reducing these allocations can improve the performance of > Float/Double.toString and AbstractStringBuilder's append(float/double). > > This patch is just a code refactoring to reduce object allocation, b