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: reduce allocations when parsing transport parameters #4483

Merged
merged 1 commit into from
May 5, 2024

Conversation

marten-seemann
Copy link
Member

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

Depends on #4482. Part of #3663.

Compared to the original (v0.43) transport parameter parser:

name                                              old time/op    new time/op    delta
TransportParameters/without_preferred_address-16     664ns ± 2%     291ns ± 1%  -56.17%  (p=0.000 n=9+9)
TransportParameters/with_preferred_address-16        795ns ± 3%     336ns ± 1%  -57.73%  (p=0.000 n=10+10)

name                                              old alloc/op   new alloc/op   delta
TransportParameters/without_preferred_address-16      720B ± 0%       40B ± 0%  -94.44%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         880B ± 0%      152B ± 0%  -82.73%  (p=0.000 n=10+10)

name                                              old allocs/op  new allocs/op  delta
TransportParameters/without_preferred_address-16      14.0 ± 0%       2.0 ± 0%  -85.71%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         18.0 ± 0%       3.0 ± 0%  -83.33%  (p=0.000 n=10+10)

Compared to #4482:

name                                              old time/op    new time/op    delta
TransportParameters/without_preferred_address-16     537ns ± 3%     291ns ± 1%  -45.85%  (p=0.000 n=9+9)
TransportParameters/with_preferred_address-16        599ns ± 3%     336ns ± 1%  -43.86%  (p=0.000 n=10+10)

name                                              old alloc/op   new alloc/op   delta
TransportParameters/without_preferred_address-16      600B ± 0%       40B ± 0%  -93.33%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         712B ± 0%      152B ± 0%  -78.65%  (p=0.000 n=10+10)

name                                              old allocs/op  new allocs/op  delta
TransportParameters/without_preferred_address-16      10.0 ± 0%       2.0 ± 0%  -80.00%  (p=0.000 n=10+10)
TransportParameters/with_preferred_address-16         11.0 ± 0%       3.0 ± 0%  -72.73%  (p=0.000 n=10+10)

Copy link

codecov bot commented May 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.03%. Comparing base (1514095) to head (11dd7ca).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4483      +/-   ##
==========================================
+ Coverage   85.01%   85.03%   +0.02%     
==========================================
  Files         154      154              
  Lines       14708    14712       +4     
==========================================
+ Hits        12503    12509       +6     
+ Misses       1695     1693       -2     
  Partials      510      510              

☔ 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
@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 force-pushed the optimize-allocs-transport-parameters branch from d7d09f7 to 11dd7ca Compare May 5, 2024 11:27
@marten-seemann marten-seemann changed the base branch from optimize-transport-parameter-parsing to master May 5, 2024 11:27
@marten-seemann marten-seemann merged commit b4210f8 into master May 5, 2024
34 checks passed
@marten-seemann marten-seemann deleted the optimize-allocs-transport-parameters 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

1 participant