-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improve get_subsets performance for single subset case #3363
Improve get_subsets performance for single subset case #3363
Conversation
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
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.
Code looks like code. Thanks!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3363 +/- ##
==========================================
- Coverage 88.77% 88.76% -0.01%
==========================================
Files 125 125
Lines 19227 19231 +4
==========================================
+ Hits 17068 17071 +3
- Misses 2159 2160 +1 ☔ View full report in Codecov by Sentry. |
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.
Yup, definitely code. LGTM!
As previously noted in the deleted comment, there's no need to process every subset if only one subset was requested. This trims the list down to only the matching subset before going through the loop processing them all.