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

Use switch expression for VarHandle$AccessMode lookup

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: