RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v4]
Raffaello Giulietti
rgiulietti at openjdk.org
Thu May 15 16:24:54 UTC 2025
On Wed, 14 May 2025 14:39:37 GMT, Johannes Graham <duke at openjdk.org> wrote:
>> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead of converting to decimal string and then parsing it. This results in an approximate 6x improvement for me.
>
> Johannes Graham has updated the pull request incrementally with three additional commits since the last revision:
>
> - Update src/java.base/share/classes/jdk/internal/math/FormattedFPDecimal.java
>
> Align better with spec
>
> Co-authored-by: Raffaello Giulietti <raffaello.giulietti at oracle.com>
> - Update src/java.base/share/classes/jdk/internal/math/FormattedFPDecimal.java
>
> Better alignment with spec
>
> Co-authored-by: Raffaello Giulietti <raffaello.giulietti at oracle.com>
> - Update src/java.base/share/classes/jdk/internal/math/FormattedFPDecimal.java
>
> Add another final
>
> Co-authored-by: Raffaello Giulietti <raffaello.giulietti at oracle.com>
Marked as reviewed by rgiulietti (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/25173#pullrequestreview-2844337861
More information about the core-libs-dev
mailing list