-
Notifications
You must be signed in to change notification settings - Fork 270
Avoid using .index() in partition_all #399
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
Conversation
|
Cool, thanks @groutr! TravisCI isn't happy about Also, any chance of adding a regression test? |
|
@eriknw I can add some more tests. I think I might be able to be smarter about calculating the index of no_pad and avoid looping altogether. I'm going to think about this a bit more tonight. |
|
Thanks, I appreciate your attention to detail. |
Awww, better. (These times are not comparable to previous times, different machine). |
|
@eriknw I'll add regression test and pep8 stuff later tonight. |
|
@eriknw, one nice benefit of this PR is that we no longer do any actual equality tests here. Only identity testing is done. And the numbers |
|
@eriknw does this look good to you? |
|
LGTM, thanks again @groutr! Merging. |
This PR fixes #387.
There is a slight performance hit, however for large sequences it is relatively small:
The overhead is a little more noticeable for small sequences: