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

wire: refactor header parsing to use quicvarint.Parse #4481

Merged
merged 3 commits into from
May 5, 2024

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented May 3, 2024

Part of #3663.

Now that we have a quicvarint.Parse (#4475), we can use that when parsing Long Header packets:

name                           old time/op    new time/op    delta
ParseInitial/without_token-16     114ns ± 4%      43ns ± 2%  -62.60%  (p=0.000 n=10+10)
ParseInitial/with_token-16        121ns ± 2%      54ns ± 1%  -55.22%  (p=0.000 n=10+8)
ParseRetry-16                     120ns ± 2%      53ns ± 2%  -55.76%  (p=0.000 n=10+10)

name                           old alloc/op   new alloc/op   delta
ParseInitial/without_token-16      192B ± 0%       96B ± 0%  -50.00%  (p=0.000 n=10+10)
ParseInitial/with_token-16         224B ± 0%      128B ± 0%  -42.86%  (p=0.000 n=10+10)
ParseRetry-16                      240B ± 0%      144B ± 0%  -40.00%  (p=0.000 n=10+10)

name                           old allocs/op  new allocs/op  delta
ParseInitial/without_token-16      4.00 ± 0%      1.00 ± 0%  -75.00%  (p=0.000 n=10+10)
ParseInitial/with_token-16         5.00 ± 0%      2.00 ± 0%  -60.00%  (p=0.000 n=10+10)
ParseRetry-16                      5.00 ± 0%      2.00 ± 0%  -60.00%  (p=0.000 n=10+10)

Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 85.29%. Comparing base (3122ca0) to head (2384a76).
Report is 5 commits behind head on master.

Files Patch % Lines
internal/wire/header.go 82.61% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4481      +/-   ##
==========================================
+ Coverage   84.92%   85.29%   +0.37%     
==========================================
  Files         154      154              
  Lines       14676    14833     +157     
==========================================
+ Hits        12463    12651     +188     
+ Misses       1700     1679      -21     
+ Partials      513      503      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marten-seemann marten-seemann added this to the v0.44 milestone May 4, 2024
internal/wire/header.go Outdated Show resolved Hide resolved
@marten-seemann marten-seemann merged commit 347a4af into master May 5, 2024
34 checks passed
@marten-seemann marten-seemann deleted the wire-optimize-header-parsing branch May 5, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants