RFR: 8338906: Avoid passing EnumDescs and extra classes to type switch methods that don't use them [v2]

Chen Liang liach at openjdk.org
Sun Aug 25 02:11:15 UTC 2024


On Sat, 24 Aug 2024 21:16:34 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> 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>

Marked as reviewed by liach (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/20693#pullrequestreview-2259071643


More information about the core-libs-dev mailing list