refactor(skip+takeWhile): Make impls consistent#223
refactor(skip+takeWhile): Make impls consistent#223bartelink wants to merge 1 commit intofsprojects:mainfrom
Conversation
cecff30 to
1e511be
Compare
|
I spent a little time today with the code changes proposed here. In general, I'm totally in favor of cleaner code. However, there's a (sometimes) significant performance penalty associated with these changes: The original code makes the decision between inclusive/exclusive on the outer rims of the function, ensuring that these static values do not trickle down to the inner loop. However, I am not quite happy with the current implementation either, so I'll give it another round tomorrow, while also keeping the consistency-improvements that you added here. |
|
Thanks for all the investigation work |
8326e4b to
18b468e
Compare
|
This PR has been continued and completed in #235, using the principles shown here. It turned out, a lot more could be simplified in these functions. |
Calved from #220: Cleanup/refactoring of
skipWhileandtakeWhile.Largely for me to distil the implementation so I could get to a clear understanding of the difference between the
Inclusiveand non-Inclusivevariants.