<i18n dev> Integrated: 8373566: Performance regression with java.text.MessageFormat subformat patterns
Justin Lu
jlu at openjdk.org
Tue Dec 16 18:14:36 UTC 2025
On Fri, 12 Dec 2025 21:59:52 GMT, Justin Lu <jlu at openjdk.org> wrote:
> This PR addresses a performance degradation when constructing a new MessageFormat that contains a subformat with a pattern that is not a predefined style. This is due to internal logic which catches an IAE specifically for subformat patterns. Perf tests for choice and number are not grouped, since performance is directly tied to subformat creation.
>
> M1 Mac - Perf (before):
>
>
> MessageFormatterBench.testSubformatChoice thrpt 15 865.430 ± 6.766 ops/ms
> MessageFormatterBench.testSubformatNumber thrpt 15 1021.808 ± 11.413 ops/ms
>
>
> M1 Mac - Perf (after):
>
>
> Benchmark Mode Cnt Score Error Units
> MessageFormatterBench.testSubformatChoice thrpt 15 1671.033 ± 55.012 ops/ms
> MessageFormatterBench.testSubformatNumber thrpt 15 3275.727 ± 47.370 ops/ms
This pull request has now been integrated.
Changeset: 81e37576
Author: Justin Lu <jlu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/81e375768837e1ae6c34c1d0a8eff06b4e1d2889
Stats: 58 lines in 2 files changed: 21 ins; 9 del; 28 mod
8373566: Performance regression with java.text.MessageFormat subformat patterns
Reviewed-by: liach, rriggs, naoto
-------------
PR: https://git.openjdk.org/jdk/pull/28806
More information about the i18n-dev
mailing list