<i18n dev> RFR: 8358880: Performance of parsing with DecimalFormat can be improved
Johannes Graham
duke at openjdk.org
Mon Jun 9 17:16:01 UTC 2025
This PR replaces construction of intermediate strings to be parsed with more direct manipulation of numbers. It also has a more streamlined mechanism of handling `Long.MIN_VALUE` when parsing longs by using `Long.parseUnsignedLong`
As a small side-effect it also eliminates the use of a cached StringBuilder in DigitList.
Testing:
- GHA
- Local run of tier 2 and jtreg:jdk/java/text
- New benchmark: DecimalFormatParseBench
-------------
Commit messages:
- Merge branch 'openjdk:master' into digitlist-getdouble-get-long
- simplify getBigDecimal
- simplify comparison
- update comment
- copyright dates
- improve getDouble, getLong
Changes: https://git.openjdk.org/jdk/pull/25644/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25644&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8358880
Stats: 177 lines in 4 files changed: 119 ins; 46 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/25644.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25644/head:pull/25644
PR: https://git.openjdk.org/jdk/pull/25644
More information about the i18n-dev
mailing list