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

Improve Set.of(...).iterator() warmup characteristics

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b07

      Description

      The iterators for ImmutableCollections.SetN and Set12 can be improved to improve startup and warmup characteristics. This has measurable impact on JVM bootstrap time, since iteration over SetN/Set12s are done intensively during module bootstrap.

      Possible improvements include:

      SetNIterator: move while loop to a leaf method to reduce method calls, while hoisting the SALT test from the loop
      Set12: move SALT branch to iterator constructor, which makes the next() method smaller, faster and with fewer branches

        Attachments

          Activity

            People

            • Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: