RFR: 8330681: Explicit hashCode and equals for java.lang.runtime.SwitchBootstraps$TypePairs [v2]

Claes Redestad redestad at openjdk.org
Mon Apr 22 08:51:41 UTC 2024


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

Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:

  Remove redundant mappings; store an immutable copy

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18865/files
  - new: https://git.openjdk.org/jdk/pull/18865/files/57d50841..b6d29f2a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18865&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18865&range=00-01

  Stats: 6 lines in 1 file changed: 0 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18865.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18865/head:pull/18865

PR: https://git.openjdk.org/jdk/pull/18865


More information about the core-libs-dev mailing list