Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8267321

Use switch expression for VarHandle$AccessMode lookup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • None
    • core-libs

      JDK-8265079 changed jli.Invokers to pull in VarHandle$AccessMode on initialization, which then shows up as a small regression on a few startup tests due how AccessMode builds up a small HashMap on class initialization.

      This map is read-only and could be converted to a switch expression. Doing so we marginally reduce the startup cost of initializing MHs/VHs and eliminate most of the regression from JDK-8265079

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: