-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Avoid expensive collection calls #24770
base: master
Are you sure you want to change the base?
Conversation
413ec91
to
a17efc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced. How big collections are we talking about here?
10*10 is not much
@losipiuk it depends on how wide the table is, right? |
|
||
public static boolean containsNone(Collection<Symbol> values, Collection<Symbol> testValues) | ||
{ | ||
return values.stream().noneMatch(ImmutableSet.copyOf(testValues)::contains); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why iterate this one and not the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method was just moved to a single utility class. It didn't change over the original one :)
Yep - but if you look at how this is used we iterate over hashSymbol, or groupingSymbols; and in non-pathological case there should not be many of those. |
Description
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: