On Wed, 4 Jun 2025 18:18:39 GMT, Johannes Graham <d...@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

Rough performance results on AArch64 M4:



Original
Benchmark                                   Mode  Cnt      Score     Error   
Units
-DecimalFormatParseBench.testParseDoubles  thrpt   15  15200.984 ± 409.547  
ops/ms
-DecimalFormatParseBench.testParseLongs    thrpt   15  25777.899 ± 559.096  
ops/ms

This PR
Benchmark                                   Mode  Cnt      Score     Error   
Units
+DecimalFormatParseBench.testParseDoubles  thrpt   15  28041.325 ± 472.657  
ops/ms
+DecimalFormatParseBench.testParseLongs    thrpt   15  34181.146 ± 655.719  
ops/ms

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

PR Comment: https://git.openjdk.org/jdk/pull/25644#issuecomment-2940975486

Reply via email to