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

Speed up Read::bytes #116651

Closed
wants to merge 3 commits into from
Closed

Commits on Oct 12, 2023

  1. Inline Bytes::next and Bytes::size_hint.

    This greatly increases its speed.
    nnethercote committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    ca7eef7 View commit details
    Browse the repository at this point in the history
  2. Add Bytes::byte field.

    We can reuse this in `next`, avoiding the need to zero-initialize a
    local variable every time, for a small speed win.
    nnethercote committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    69ad06f View commit details
    Browse the repository at this point in the history
  3. Use read_exact in Bytes::next.

    This is much faster.
    nnethercote committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    ed2a587 View commit details
    Browse the repository at this point in the history