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: use quicvarint.Parse to when parsing transport parameters #4482

Merged
merged 2 commits into from
May 5, 2024

Conversation

marten-seemann
Copy link
Member

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

With quicvarint.Parse (#4475) we can now parse the transport parameter's varints without allocating a bytes.Reader.

Part of #3663.

name                                              old time/op    new time/op    delta
TransportParameters/without_preferred_address-16     664ns ± 2%     537ns ± 3%  -19.04%  (p=0.000 n=9+9)
TransportParameters/with_preferred_address-16        795ns ± 3%     599ns ± 3%  -24.70%  (p=0.000 n=10+10)

name                                              old alloc/op   new alloc/op   delta
TransportParameters/without_preferred_address-16      720B ± 0%      600B ± 0%  -16.67%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         880B ± 0%      712B ± 0%  -19.09%  (p=0.000 n=10+10)

name                                              old allocs/op  new allocs/op  delta
TransportParameters/without_preferred_address-16      14.0 ± 0%      10.0 ± 0%  -28.57%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         18.0 ± 0%      11.0 ± 0%  -38.89%  (p=0.000 n=10+10)

@marten-seemann marten-seemann force-pushed the optimize-transport-parameter-parsing branch 2 times, most recently from 2e6618d to ec98052 Compare May 4, 2024 01:02
Copy link

codecov bot commented May 4, 2024

Codecov Report

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

Project coverage is 85.31%. Comparing base (a5adbd4) to head (0e6c728).
Report is 4 commits behind head on master.

Files Patch % Lines
internal/wire/transport_parameters.go 72.58% 10 Missing and 7 partials ⚠️
internal/handshake/crypto_setup.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4482      +/-   ##
==========================================
+ Coverage   84.92%   85.31%   +0.39%     
==========================================
  Files         154      154              
  Lines       14676    14846     +170     
==========================================
+ Hits        12463    12665     +202     
+ Misses       1700     1677      -23     
+ Partials      513      504       -9     

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

internal/handshake/crypto_setup.go Outdated Show resolved Hide resolved
@marten-seemann marten-seemann force-pushed the optimize-transport-parameter-parsing branch from ec98052 to 0e6c728 Compare May 5, 2024 10:55
@marten-seemann marten-seemann merged commit 1514095 into master May 5, 2024
34 checks passed
@marten-seemann marten-seemann deleted the optimize-transport-parameter-parsing branch May 5, 2024 12:49
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