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

Declare package-private VarHandle.AccessMode/AccessType counts

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 17
    • core-libs

    Description

      When creating VarHandles and in a few other places we call VarHandle.AccessMode/-Type.values().length. This cause cloning of the underlying array, only to discard it. An optimizing compiler would of course shortcut this, but these calls mostly happen during startup of applications. To reduce startup/warmup overheads of using VarHandles (which will be more crucial with JDK-8267277) it makes sense to introduce a constant value equal to values().length.

      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: