eclipse-collections
eclipse-collections copied to clipboard
Optimize UnifiedSet.trimToSize().
When iterating through a ChainedBucket, every item was a collision before shrinking and will remain a collision after shrinking. Instead of repeatedly looking up the ChainedBucket and iterating to the end of it, the algorithm could look it up once and walk through the new and old ChainedBuckets simultaneously.