Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize any/all/NoneSatisfy on UnifiedMapWithHashingStrategy #1342

Closed
donraab opened this issue May 2, 2022 · 4 comments
Closed

Optimize any/all/NoneSatisfy on UnifiedMapWithHashingStrategy #1342

donraab opened this issue May 2, 2022 · 4 comments

Comments

@donraab
Copy link
Contributor

donraab commented May 2, 2022

The methods anySatisfy, allSatisfy and noneSatisfy should be optimized on UnifiedMapWithHashingStrategy similar to how they are optimized on UnifiedMap.

@Desislav-Petrov
Copy link
Contributor

Happy to take a look at this

@Desislav-Petrov
Copy link
Contributor

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?

@motlin
Copy link
Contributor

motlin commented Oct 3, 2022

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.

@Desislav-Petrov
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants