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.

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

Commit messages:
 - Move typePairToName to TypePairs to make this lazy loaded
 - Explicit hashCode and equals for SwitchBootstraps

Changes: https://git.openjdk.org/jdk/pull/18865/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18865&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330681
  Stats: 18 lines in 1 file changed: 14 ins; 3 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

Reply via email to