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

rlp: minor optimizations for slice/array encoding #23467

Merged
merged 4 commits into from Aug 25, 2021
Merged

Commits on Aug 25, 2021

  1. Copy the full SHA
    edfc605 View commit details
    Browse the repository at this point in the history
  2. rlp: pass length to byteArrayBytes

    This makes it possible to inline the function, and the length
    is known at encoder construction time.
    fjl committed Aug 25, 2021
    Copy the full SHA
    7c9a64e View commit details
    Browse the repository at this point in the history
  3. rlp: avoid IsNil for pointer encoding

    It's actually cheaper to use Elem first, because it performs less checks
    on the value. If the pointer was nil, the result of Elem is 'invalid'.
    fjl committed Aug 25, 2021
    Copy the full SHA
    5094ef1 View commit details
    Browse the repository at this point in the history
  4. rlp: minor optimizations for slice/array encoding

    For empty slices/arrays, we can avoid storing a list header entry in the
    encoder buffer. Also avoid doing the tail check at encoding time because
    it is already known at encoder construction time.
    fjl committed Aug 25, 2021
    Copy the full SHA
    8b57ade View commit details
    Browse the repository at this point in the history