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

Conversation

jrmuizel
Copy link
Contributor

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 bincode-org#206
@TyOverby
Copy link
Collaborator

Looks good, thanks!

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

@pcwalton
Copy link

@TyOverby It's at servo/webrender#1834.

@jrmuizel
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants