RFR: 8330681: Explicit hashCode and equals for java.lang.runtime.SwitchBootstraps$TypePairs
Jan Lahoda
jlahoda at openjdk.org
Fri Apr 19 13:30:27 UTC 2024
On Fri, 19 Apr 2024 13:23:53 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> We can reduce overhead of first use of a switch bootstrap by moving `typePairToName` into `TypePairs` and by explicitly overriding `hashCode` and `equals`. The first change avoids loading and initializing the `TypePairs` class in actual cases, the second remove some excess code generation from happening on first use.
Looks good to me.
-------------
Marked as reviewed by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18865#pullrequestreview-2011427815
More information about the core-libs-dev
mailing list