Skip to content

Avoid a copy and reverse operation in CigarUtils.isGood #6439

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

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

lbergelson
Copy link
Member

  • CigarUtils.isGood() which is used in GoodCigarReadFilter did a pointlessly expensive copy and sort operation. Replaced it with a reversing list view which avoids a copy and sort.

* CigarUtils.isGood which is used in GoodCigarReadFilter did a pointlessly expensive copy and sort operation.
  Replaced ith with a reversing list view which avoids a copy and sort.
@lbergelson
Copy link
Member Author

@davidbenjamin You like minor optimizations...

@davidbenjamin
Copy link
Contributor

I do like them! Looks good. I think #6403 had a few more places for Lists.reverse in our cigar code.

@lbergelson lbergelson merged commit 2163b83 into master Feb 4, 2020
@lbergelson lbergelson deleted the lb_avoid_copy_in_good_cigar_filter branch February 4, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants