RFR: 8373566: Performance regression with java.text.MessageFormat subformat patterns [v2]
Justin Lu
jlu at openjdk.org
Fri Dec 12 22:24:07 UTC 2025
> 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
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
pull values() into a var
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28806/files
- new: https://git.openjdk.org/jdk/pull/28806/files/702b35f9..8eea336f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28806&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28806&range=00-01
Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/28806.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28806/head:pull/28806
PR: https://git.openjdk.org/jdk/pull/28806
More information about the core-libs-dev
mailing list