RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v4]
Johannes Graham
duke at openjdk.org
Wed May 14 14:39:37 UTC 2025
> 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>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25173/files
- new: https://git.openjdk.org/jdk/pull/25173/files/e7d2d14b..0cc32fc0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25173&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25173&range=02-03
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/25173.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25173/head:pull/25173
PR: https://git.openjdk.org/jdk/pull/25173
More information about the core-libs-dev
mailing list