RFR: 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations [v4]
Claes Redestad
redestad at openjdk.org
Thu May 23 11:09:14 UTC 2024
> We can fold the call to `Objects.checkIndex` into the code generated in generateTypeSwitchSkeleton instead of doing so by filtering the MH argument. This loads 9 less classes (of which 8 generated LFs and Species classes) on a minimal test, while being neutral on a throughput sanity test:
>
>
> Name Cnt Base Error Test Error Unit Change
> SwitchSanity.switchSum 15 8,162 ± 0,117 8,152 ± 0,131 ns/op 1,00x (p = 0,800 )
> * = significant
> ```
>
> A few additional optimizations includes moving some seldom used `findStatic` calls to a holder. All in all this means a reduction by 22M cycles to bootstrap a trivial switch expression on my M1.
Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
Remove unused import, revert left-overs in MethodTypeDescImpl
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19307/files
- new: https://git.openjdk.org/jdk/pull/19307/files/f04d78ea..eb4babe5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19307&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19307&range=02-03
Stats: 3 lines in 2 files changed: 0 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/19307.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19307/head:pull/19307
PR: https://git.openjdk.org/jdk/pull/19307
More information about the core-libs-dev
mailing list