On Fri, 19 Dec 2025 06:14:49 GMT, Shaojin Wen <[email protected]> wrote:

>> Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString 
>> and BigDecimal::toPlainString performance and reduce duplicate code
>
> Shaojin Wen has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains 37 commits:
> 
>  - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>  - simplify layoutChars
>  - comments, from @liach
>  - getValueString -> getCompactValueString, from @liach
>  - Refactor BigDecimal string creation to use 
> JLA.uncheckedNewStringWithLatin1Bytes
>    
>    Co-authored-by: Qwen-Coder <[email protected]>
>  - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>    
>    # Conflicts:
>    #  src/java.base/share/classes/java/math/BigDecimal.java
>  - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>    
>    # Conflicts:
>    #  src/java.base/share/classes/java/math/BigDecimal.java
>    #  src/java.base/share/classes/jdk/internal/util/DecimalDigits.java
>    #  test/micro/org/openjdk/bench/java/math/BigDecimals.java
>  - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>  - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>    
>    # Conflicts:
>    #  src/java.base/share/classes/jdk/internal/util/DecimalDigits.java
>  - remove getChars(long, int, char[])
>  - ... and 27 more: https://git.openjdk.org/jdk/compare/3f33eaa4...32d95b36

I think this PR should be separated into at least 2 PRs to help review:

1. Create `unscaledString`, `scale2`, `getCompactValueString`, `layoutCharsE`, 
without adding new use of `byte[]`/LATIN1 optimizations;
   This PR should make the logical updates clear, and there would be no 
security risk in this patch.
2. The string performance tricks using `uncheckedXxx` and `byte[]`

-------------

Changes requested by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23310#pullrequestreview-3695174105

Reply via email to