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

Add ranged streams #42

Merged
merged 5 commits into from Sep 16, 2015

Conversation

Projects
None yet
1 participant
@Marwes
Owner

Marwes commented Aug 2, 2015

Ranged streams are streams which in addition to allowing taking elements one by one also are able to take an entire range of elements efficiently. For example the stream &str can be split into two different slices. This should give a large performance boost to streams which uses it as they can avoid allocating every time multiple tokens are needed and instead just use the data in the stream itself.

This PR is a breaking change since it changes the ParseError<T = Stream::Item> to ParseError<S: Stream> so it needs to be merged before 1.0 (I had hoped not to break anything after 1.0- beta but this is only minor breaking change and only if you used some types directly from the primitives module). I might lift that breaking change out and merge it separately, allowing 1.0 to be released and RangeStream to be tested a bit more.

@Marwes

This comment has been minimized.

Show comment
Hide comment
@Marwes

Marwes Sep 7, 2015

Owner

Rebased on current master, taking into account the changes to &[T] streams

Owner

Marwes commented Sep 7, 2015

Rebased on current master, taking into account the changes to &[T] streams

Marwes added a commit that referenced this pull request Sep 16, 2015

@Marwes Marwes merged commit b31b6c8 into master Sep 16, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Marwes Marwes deleted the range_stream branch Oct 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment