<i18n dev> Integrated: 8358880: Performance of parsing with DecimalFormat can be improved

Johannes Graham duke at openjdk.org
Thu Jul 31 17:53:04 UTC 2025


On Wed, 4 Jun 2025 18:18:39 GMT, Johannes Graham <duke at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: d1944239
Author:    Johannes Graham <j3graham at gmail.com>
Committer: Raffaello Giulietti <rgiulietti at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d19442399c004c78bff8a5ccf7c6975c7e583a07
Stats:     184 lines in 4 files changed: 126 ins; 48 del; 10 mod

8358880: Performance of parsing with DecimalFormat can be improved

Reviewed-by: jlu, liach, rgiulietti

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

PR: https://git.openjdk.org/jdk/pull/25644


More information about the i18n-dev mailing list