eclipse-collections
eclipse-collections copied to clipboard
Optimize any/all/NoneSatisfy on UnifiedMapWithHashingStrategy
The methods anySatisfy, allSatisfy and noneSatisfy should be optimized on UnifiedMapWithHashingStrategy similar to how they are optimized on UnifiedMap.
Happy to take a look at this
hi @donraab started looking at the issue - looks like we need implement the three methods on the UnifiedMapWithHashingStrategy with a similar implementation to the one in UnifiedMap. To avoid the duplication, we should probably extract the helper methods into a common util and reuse?
The ultimate way to reduce code duplication would be to say our mutable maps are all new UnifiedMapWithHashingStrategy<>(HashingStrategies.defaultStrategy()) but we're worried this would hurt performance a bit. I wouldn't worry about duplication too much.
Thanks @motlin - I was looking at it and it seemed nasty to just copy/paste the code so I decided to take it out in the util class and reuse.