RFR: 8338906: Avoid passing EnumDescs and extra classes to type switch methods that don't use them [v2]
Claes Redestad
redestad at openjdk.org
Sat Aug 24 21:16:34 UTC 2024
> This PR refactors SwitchBootstraps so that extra EnumDescs and classes are only passed into bootstraps when needed. Benchmarking shows that in many cases these are not needed, and avoiding passing them (via binding in the lists via `MethodHandle::insertArguments`) avoids some auxiliary MH combinator generation during bootstrap.
>
> Additional cleanups and refactoring further reduce bootstrap overhead and number of classes loaded.
Claes Redestad has updated the pull request incrementally with two additional commits since the last revision:
- Update src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java
Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
- Update src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java
Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20693/files
- new: https://git.openjdk.org/jdk/pull/20693/files/3c793661..fcdc4c68
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20693&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20693&range=00-01
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/20693.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20693/head:pull/20693
PR: https://git.openjdk.org/jdk/pull/20693
More information about the core-libs-dev
mailing list