-
Notifications
You must be signed in to change notification settings - Fork 311
Speed up ichunked #797
Copy link
Copy link
Closed
Description
Pull request
Changes
I was trying to create my own ichunked method and found this library and thought I might contribute. This new method implementation runs about 2x faster than the current implementation due to it not using any user created iterators (eg. classes with the next() method).
There should be no changes visible to the end user other than the speed difference unless the user is relying on the private class _IChunk.
This implementation uses a scoped variables within a wrapping method scope to modify the state of the generator on the fly.
I have tested and timed this method extensively using both calls to next() and just looping. I have also tried modifying the state part way through iteration and I have not run across any issues.
A simple timing test:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

