On Mon, 20 May 2024 10:52:27 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> 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. This pull request has now been integrated. Changeset: 2581935b Author: Claes Redestad <redes...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/2581935b47afaf661a94c8a8e50ce08065d632f6 Stats: 165 lines in 4 files changed: 125 ins; 14 del; 26 mod 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations Reviewed-by: liach, jlahoda ------------- PR: https://git.openjdk.org/jdk/pull/19307