<i18n dev> RFR: 8335252: Use ImmutableBitSetPredicate optimize j.u.Formatter.Conversion#isValid [v2]
Shaojin Wen
duke at openjdk.org
Thu Jun 27 14:12:36 UTC 2024
> Currently, the java.util.Formatter$Conversion::isValid method is implemented based on switch, which cannot be inlined because codeSize > 325. This problem can be avoided by implementing it with ImmutableBitSetPredicate.
>
> use `-XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining` to see the master branch:
>
> @ 109 java.util.Formatter$Conversion::isValid (358 bytes) failed to inline: hot method too big
>
>
> current version
>
> @ 109 java.util.Formatter$Conversion::isValid (10 bytes) inline (hot)
> @ 4 jdk.internal.util.ImmutableBitSetPredicate$SmallImmutableBitSetPredicate::test (50 bytes) inline (hot)
Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
revert & use `@ForceInline`
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19926/files
- new: https://git.openjdk.org/jdk/pull/19926/files/fb5c8001..d2bebbdf
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19926&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19926&range=00-01
Stats: 59 lines in 1 file changed: 23 ins; 32 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/19926.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19926/head:pull/19926
PR: https://git.openjdk.org/jdk/pull/19926
More information about the i18n-dev
mailing list