-
Enhancement
-
Resolution: Fixed
-
P4
-
None
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
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