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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • None
    • core-libs

      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

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

              Created:
              Updated:
              Resolved: