Skip to content
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

Forward read_exact() as well as read(). #207

Merged
merged 1 commit into from Oct 10, 2017
Merged

Conversation

@jrmuizel
Copy link
Contributor

jrmuizel commented Oct 10, 2017

If we don't do this we end up using the generic read_exact method
which is not necessarily optimal. This is especially when
using a specialized Read implementation to go fast.
See #206

If we don't do this we end up using the generic read_exact method
which is not necessarily optimal. This is especially when
using a specialized Read implementation to go fast.
See #206
@TyOverby TyOverby merged commit b539ec0 into servo:master Oct 10, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@TyOverby
Copy link
Collaborator

TyOverby commented Oct 10, 2017

Looks good, thanks!

I'm also really interested in your specialized Read implementation. Is this the one that eschews bounds checking?

@pcwalton
Copy link

pcwalton commented Oct 10, 2017

@jrmuizel
Copy link
Contributor Author

jrmuizel commented Oct 10, 2017

I just realized that this pull request alone will improve deserialization performance because we'll now be using the read_exact() implementation on &mut [u8] which is simpler than the default read() implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.