refactored slice to avoid twice iteration - #1011
Conversation
|
While there are two enumerable methods involved in the previous version, I don't see how it would have iterated the sequence twice - both Furthermore, for non-list sequence, |
Codecov Report
@@ Coverage Diff @@
## master #1011 +/- ##
==========================================
- Coverage 92.57% 92.57% -0.01%
==========================================
Files 113 113
Lines 3422 3433 +11
Branches 1055 1060 +5
==========================================
+ Hits 3168 3178 +10
Misses 191 191
- Partials 63 64 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
atifaziz
left a comment
There was a problem hiding this comment.
While there are two enumerable methods involved in the previous version, I don't see how it would have iterated the sequence twice - both
SkipandTakeare lazy, and neither will pull items unnecessarily.
@leandromoh I agree with @viceroypenguin here that there isn't any re-iteration going on here.
It would be good to update the tests for
Sliceto confirm this, though.
Yup, this should be done first and anyway. This was the idea behind PR #759. Either a commit against it or a separate one for just Slice would be welcome.
|
Closing this assuming it's unnecessary and abandoned. |
No description provided.