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: improve decoder stream implementation #22858

Merged
merged 9 commits into from
May 18, 2021
Merged

Commits on May 11, 2021

  1. rlp: shrink Stream struct

    This removes a lot unused padding space in Stream by reordering the
    fields. The size of Stream changes from 120 bytes to 88 bytes.
    
    Stream instances are internally cached and reused using sync.Pool, so
    this change does not improve performance at all. However, I still think
    it's worth to apply this because the previous definition was so
    wasteful.
    fjl committed May 11, 2021
    Configuration menu
    Copy the full SHA
    4ead400 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5905ea View commit details
    Browse the repository at this point in the history
  3. rlp: simplify uintbuf clearing

    fjl committed May 11, 2021
    Configuration menu
    Copy the full SHA
    7b3189f View commit details
    Browse the repository at this point in the history
  4. rlp: simplify list stack

    The list stack kept track of the size of the current list context as
    well as the current offset into it. The size had to be stored in the
    stack in order to subtract it from the remaining bytes of any enclosing
    list in ListEnd.
    
    It seems that this can be implemented in a simpler way: just subtract
    the size from the enclosing list context in List instead.
    fjl committed May 11, 2021
    Configuration menu
    Copy the full SHA
    9e55e9a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    acda970 View commit details
    Browse the repository at this point in the history
  6. rlp: re-wrap size tag comments

    fjl committed May 11, 2021
    Configuration menu
    Copy the full SHA
    9759ad9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dea3923 View commit details
    Browse the repository at this point in the history
  8. rlp: use listLimit in ListEnd

    fjl committed May 11, 2021
    Configuration menu
    Copy the full SHA
    02b01f9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b279921 View commit details
    Browse the repository at this point in the history