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

Claes Redestad redestad at openjdk.org
Mon Apr 22 08:57:45 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:

  Revert changes, splitting these out to a separate PR

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

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

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

  Stats: 6 lines in 1 file changed: 5 ins; 0 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