> 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 30 commits:
- Merge rem
On Sat, 1 Feb 2025 08:42:32 GMT, Shaojin Wen 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 re
I would like to amplify this point — undermining Java’s integrity is a big
deal. Every time we use unsafe mechanisms within the JDK we risk doing that.
The more complex such code is the harder it is reason about whether overall it
is safe [*]. We need to balance reasoning about code, quality, an
On Tue, Feb 4, 2025 at 5:26 PM Shaojin Wen wrote:
> I think you are talking about the problem of PR #23420, which is caused by
> the use of thread-unsafe StringBuilder in multi-threaded scenarios. This
> problem is very obscure and I didn't consider it before. I have started to
> solve this probl
On Sat, 1 Feb 2025 08:42:32 GMT, Shaojin Wen 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 re
On Tue, Feb 4, 2025 at 2:40 PM Joe Darcy wrote:
> Can we please have a pause on the sequence of "make XYZ toString faster"
> PRs until there is some wider discussion of goals, etc.? Thanks.
>
I agree with this sentiment... It was surprising to see how easily a VM
crash can sneak in.
There is al
On Sat, 1 Feb 2025 08:42:32 GMT, Shaojin Wen 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 re
On Sun, 2 Feb 2025 06:58:21 GMT, Johannes Graham wrote:
>> Good suggestion, but DecimalDigits no longer provides a pair method
>
> Right - you’d need to add it back to try this
I tested it on a MacBook M1 Max machine and the results were different from
what you said. Using StringBuilder + digit
On Sat, 1 Feb 2025 21:04:29 GMT, Johannes Graham wrote:
>> Shaojin Wen has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains 29 commits:
>>
>> - Merge remote-tracking branch 'upstream/master' into dec_to_str_202501
>>
>># Confl
On Sat, 1 Feb 2025 08:42:32 GMT, Shaojin Wen 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 re
> 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 29 commits:
- Merge rem
> 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 incrementally with one additional
commit since the last revision:
remove getChars(long, int, char[])
-
> 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 27 commits:
- copyright
On Mon, 27 Jan 2025 06:03:17 GMT, Shaojin Wen wrote:
>> src/java.base/share/classes/java/math/BigDecimal.java line 3538:
>>
>>> 3536: return (signum < 0 ? "-0." : "0.").concat(intString);
>>> 3537: } else if (insertionPoint > 0) { /* Point goes inside intVal
>>> */
>>> 3538:
On Sun, 26 Jan 2025 19:31:08 GMT, Johannes Graham wrote:
>> Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString
>> and BigDecimal::toPlainString performance and reduce duplicate code
>
> src/java.base/share/classes/java/math/BigDecimal.java line 3538:
>
>> 3536:
On Sat, 25 Jan 2025 07:25:40 GMT, Shaojin Wen wrote:
> Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString
> and BigDecimal::toPlainString performance and reduce duplicate code
src/java.base/share/classes/java/math/BigDecimal.java line 3538:
> 3536: return
On Sat, 25 Jan 2025 07:25:40 GMT, Shaojin Wen wrote:
> Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString
> and BigDecimal::toPlainString performance and reduce duplicate code
The performance numbers as follows. In the smallScale2EngineeringToString and
smallScale2Lay
On Sat, 25 Jan 2025 07:25:40 GMT, Shaojin Wen wrote:
> Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString
> and BigDecimal::toPlainString performance and reduce duplicate code
A great cleanup that consolidates scale2, unscaledAbsString, and unscaledString.
---
Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString
and BigDecimal::toPlainString performance and reduce duplicate code
-
Commit messages:
- simplify and comments
- simplify
- simplify
- code style
- revert change
- bug fix
- bug fix
- refactor
- Rev
Continue to complete PR #16006 to improve performance and reduce duplicate code
-
Commit messages:
- optimize BigDecimal toString/toPlainString
- add benchmark
Changes: https://git.openjdk.org/jdk/pull/22009/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22009&range=00
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Mon, 23 Oct 2023 11:50:02 GMT, Shaojin Wen wrote:
> Can I add scale2 method to StringLatin1?
I'd strongly advice against this.
> I think this is more readable than using MethodHandle.
View the `MethodHandle`s you add to use `StringConcatFactory` here as a
temporary workaround before the c
On Thu, 19 Oct 2023 11:58:26 GMT, Claes Redestad wrote:
>> @cl4es
>>
>>> Good, narrows it down to what's going on in `prepend(long, byte[],
>>> String)`. Might boil down to `System.arraycopy`. This method might not be
>>> optimized for tiny arrays on all platforms. Specializing for single-cha
On Thu, 19 Oct 2023 10:22:19 GMT, Raffaello Giulietti
wrote:
>> I've opened up #16244 for review - thanks for helping with analysis and
>> verification.
>
> @cl4es @wenshao I'd like to review the mathematical aspects of these changes
> once the refactorings with string concatenations have stab
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Thu, 19 Oct 2023 11:58:26 GMT, Claes Redestad wrote:
>> @cl4es
>>
>>> Good, narrows it down to what's going on in `prepend(long, byte[],
>>> String)`. Might boil down to `System.arraycopy`. This method might not be
>>> optimized for tiny arrays on all platforms. Specializing for single-cha
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Thu, 19 Oct 2023 11:38:57 GMT, Shaojin Wen wrote:
> In addition to #16244, will you submit a PR for this?
Once both #16244 and this has been integrated I want to revisit this. The
effect of changing `getBytes(byte[], int, byte)` might have disappeared with
#16244 since it better guarantees
On Wed, 18 Oct 2023 15:59:31 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use StringConcatFactory.makeConcatWithConstants
>
> I've opened up #16244 for review - thanks for helping with analysi
On Wed, 18 Oct 2023 15:59:31 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use StringConcatFactory.makeConcatWithConstants
>
> I've opened up #16244 for review - thanks for helping with analysi
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Tue, 17 Oct 2023 15:56:58 GMT, Chen Liang wrote:
> Can you export jfr recordings of two different runs to check?
How to do this? I don't know how yet
-
PR Comment: https://git.openjdk.org/jdk/pull/16006#issuecomment-1767448022
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 16 Oct 2023 15:00:42 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Fri, 13 Oct 2023 17:01:11 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Thu, 12 Oct 2023 21:49:00 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Wed, 11 Oct 2023 21:46:04 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Wed, 11 Oct 2023 22:19:29 GMT, Shaojin Wen wrote:
> Keep the duplicate code of StringConcatHelper, or use JLA, or move the code
> of getCharsLatin1 & stringSize to DecimalDigits (PR #15699). Of the three
> options, using JLA is the smallest change.
Adding methods to JLA also adds a maintena
On Wed, 11 Oct 2023 09:50:20 GMT, Claes Redestad wrote:
> I'm not really qualified to review the floating point code. Simplifying away
> offset and getting rid of the StringBuilderHelper all seem like good
> improvements, though I think it'd be good if we could either avoid or split
> out the
On Wed, 11 Oct 2023 22:10:45 GMT, Shaojin Wen wrote:
>> src/java.base/share/classes/java/math/BigDecimal.java line 4168:
>>
>>> 4166: int lowInt = (int)intCompact % 100;
>>> 4167: int highInt = (int)intCompact / 100;
>>> 4168: int highIntSize = JLA.stringSize(
On Wed, 11 Oct 2023 09:48:58 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> refactor based on @liach 's review
>
> src/java.base/share/classes/java/math/BigDecimal.java line 4168:
>
>> 4166:
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster.
> Please review and don't hesitate
On Mon, 9 Oct 2023 19:20:29 GMT, Shaojin Wen wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also
On Mon, 9 Oct 2023 19:20:29 GMT, 温绍锦 wrote:
>> I submitted PR #1 before, and there were too many changes. I split it
>> into multiple PRs with small changes. This one is one of them.
>>
>> this PR removed the duplicate code for getChars in
>> BigDecimal#StringBuilderHelper, i also make per
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performance faster, Here are the
> numbers run on a M
On Sun, 8 Oct 2023 15:30:00 GMT, Chen Liang wrote:
> I think the String concat indy call site already generates code that computes
> the size of the char array to be allocated (remember the lengthCoder from
> String Concat). We can probably just use `highInt + '.' +
> StringBuilderHelper.DIGIT
On Mon, 2 Oct 2023 05:40:03 GMT, 温绍锦 wrote:
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performa
On Mon, 2 Oct 2023 05:40:03 GMT, 温绍锦 wrote:
> I submitted PR #1 before, and there were too many changes. I split it
> into multiple PRs with small changes. This one is one of them.
>
> this PR removed the duplicate code for getChars in
> BigDecimal#StringBuilderHelper, i also make performa
I submitted PR #1 before, and there were too many changes. I split it into
multiple PRs with small changes. This one is one of them.
this PR removed the duplicate code for getChars in
BigDecimal#StringBuilderHelper, i also make performance faster, Here are the
numbers run on a MacBook M1 Pr
On Fri, 8 Sep 2023 14:50:15 GMT, Claes Redestad wrote:
> Seems like a step in the right direction w.r.t. code duplication. There's
> still a lot going on in this PR so it'll take some time to digest. Is there
> some way to split this into a series of enhancements for easier review? The
> `jla.
On Thu, 14 Sep 2023 11:19:08 GMT, 温绍锦 wrote:
>> BigDecimal is a commonly used class in business development, It is often
>> necessary to perform toString or toPlainString operations on BigDecimal.
>>
>> The current version uses StringBuilder resulting in multiple memory
>> allocations, I made
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
On Fri, 8 Sep 2023 18:17:12 GMT, 温绍锦 wrote:
>> BigDecimal is a commonly used class in business development, It is often
>> necessary to perform toString or toPlainString operations on BigDecimal.
>>
>> The current version uses StringBuilder resulting in multiple memory
>> allocations, I made a
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
On Fri, 8 Sep 2023 16:25:27 GMT, Roger Riggs wrote:
>> I'll have a look at #14655 though I note that @RogerRiggs has already
>> commented that this might not carry its own weight. These internal API
>> bridges are a nuisance so we need to take care to make sure that any
>> addition is actually
On Fri, 8 Sep 2023 15:48:55 GMT, Claes Redestad wrote:
>> Going from `jla.newStringNoRepl(bytes, ISO_...)` to
>> `jla.newStringLatin1NoRepl(bytes)` isn't much of a code simplification, so
>> this distracts a bit from the bulk of the changes in this PR. I agree that
>> it *might* help inlining
On Fri, 8 Sep 2023 15:48:55 GMT, Claes Redestad wrote:
>> Going from `jla.newStringNoRepl(bytes, ISO_...)` to
>> `jla.newStringLatin1NoRepl(bytes)` isn't much of a code simplification, so
>> this distracts a bit from the bulk of the changes in this PR. I agree that
>> it *might* help inlining
On Fri, 8 Sep 2023 15:41:41 GMT, Claes Redestad wrote:
>> Notice there is patch https://github.com/openjdk/jdk/pull/14655 (bug
>> 8310901) for converting these usages to a new `newStringLatin1NoRepl`.
>
> Going from `jla.newStringNoRepl(bytes, ISO_...)` to
> `jla.newStringLatin1NoRepl(bytes)` i
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
On Fri, 8 Sep 2023 15:39:47 GMT, Chen Liang wrote:
>> newStringLatin1NoRepl does not significantly help performance, but it
>> simplifies the code.
>>
>> Of course, there is another advantage: because the call will be simpler,
>> making it easier for the caller method to implement codeSize sm
On Fri, 8 Sep 2023 15:34:16 GMT, 温绍锦 wrote:
>> src/java.base/share/classes/java/lang/String.java line 699:
>>
>>> 697: }
>>> 698:
>>> 699: static String newStringLatin1NoRepl(byte[] bytes) {
>>
>> How much does this help compared to calling `jla.newStringNoRepl(bytes,
>> StandardChars
On Fri, 8 Sep 2023 12:25:02 GMT, Claes Redestad wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Continue to optimize and reduce duplicate code
>
> src/java.base/share/classes/java/lang/String.java line 699:
>
>> 697: }
On Fri, 8 Sep 2023 12:00:17 GMT, 温绍锦 wrote:
>> BigDecimal is a commonly used class in business development, It is often
>> necessary to perform toString or toPlainString operations on BigDecimal.
>>
>> The current version uses StringBuilder resulting in multiple memory
>> allocations, I made a
On Tue, 5 Sep 2023 18:13:39 GMT, Claes Redestad wrote:
>> 温绍锦 has updated the pull request with a new target base due to a merge or a
>> rebase. The incremental webrev excludes the unrelated changes brought in by
>> the merge/rebase. The pull request contains four additional commits since
>> t
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
> BigDecimal is a commonly used class in business development, It is often
> necessary to perform toString or toPlainString operations on BigDecimal.
>
> The current version uses StringBuilder resulting in multiple memory
> allocations, I made a modification to improve performance.
>
> Because
On Wed, 6 Sep 2023 03:34:04 GMT, 温绍锦 wrote:
>> BigDecimal is a commonly used class in business development, It is often
>> necessary to perform toString or toPlainString operations on BigDecimal.
>>
>> The current version uses StringBuilder resulting in multiple memory
>> allocations, I made a
1 - 100 of 111 matches
Mail list logo