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

refactor(udp): pass SocketAddr instead of &SocketAddr #2169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Oct 11, 2024

SocketAddr implements Copy.

https://doc.rust-lang.org/std/net/enum.SocketAddr.html#impl-Copy-for-SocketAddr

Thus there is no need to pass by reference instead of by value.

Broken out of #2093.

`SocketAddr` implements `Copy`.

https://doc.rust-lang.org/std/net/enum.SocketAddr.html#impl-Copy-for-SocketAddr

Thus there is no need to pass by reference instead of by value.
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (944c817) to head (b88836b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2169   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files         112      112           
  Lines       36373    36373           
=======================================
  Hits        34697    34697           
  Misses       1676     1676           

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

Copy link

Failed Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

@larseggert
Copy link
Collaborator

Is the size of the object a concern?

Copy link

Benchmark results

Performance differences relative to 944c817.

coalesce_acked_from_zero 1+1 entries: Change within noise threshold.
       time:   [98.527 ns 98.857 ns 99.199 ns]
       change: [-1.8080% -1.1772% -0.6129%] (p = 0.00 < 0.05)

Found 10 outliers among 100 measurements (10.00%)
10 (10.00%) high severe

coalesce_acked_from_zero 3+1 entries: Change within noise threshold.
       time:   [116.43 ns 116.78 ns 117.18 ns]
       change: [-1.2359% -0.8200% -0.3878%] (p = 0.00 < 0.05)

Found 13 outliers among 100 measurements (13.00%)
2 (2.00%) low severe
2 (2.00%) low mild
9 (9.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [116.07 ns 116.41 ns 116.83 ns]
       change: [-1.2941% -0.0446% +2.1546%] (p = 0.97 > 0.05)

Found 14 outliers among 100 measurements (14.00%)
6 (6.00%) low severe
1 (1.00%) low mild
3 (3.00%) high mild
4 (4.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [97.543 ns 97.735 ns 97.949 ns]
       change: [-1.3610% -0.4712% +0.2919%] (p = 0.31 > 0.05)

Found 6 outliers among 100 measurements (6.00%)
4 (4.00%) high mild
2 (2.00%) high severe

RxStreamOrderer::inbound_frame(): 💚 Performance has improved.
       time:   [110.88 ms 110.95 ms 111.02 ms]
       change: [-2.5507% -2.4824% -2.4168%] (p = 0.00 < 0.05)

Found 21 outliers among 100 measurements (21.00%)
10 (10.00%) low mild
9 (9.00%) high mild
2 (2.00%) high severe

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [26.577 ms 27.720 ms 28.858 ms]
       change: [-5.6210% -0.2744% +5.6039%] (p = 0.92 > 0.05)
transfer/pacing-true/varying-seeds: No change in performance detected.
       time:   [34.887 ms 36.553 ms 38.245 ms]
       change: [-6.2326% -0.1268% +6.4316%] (p = 0.97 > 0.05)

Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high mild

transfer/pacing-false/same-seed: No change in performance detected.
       time:   [26.070 ms 26.851 ms 27.637 ms]
       change: [-2.0055% +2.1267% +6.4813%] (p = 0.33 > 0.05)
transfer/pacing-true/same-seed: No change in performance detected.
       time:   [41.459 ms 43.353 ms 45.298 ms]
       change: [-8.8390% -3.0180% +3.2661%] (p = 0.34 > 0.05)

Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild

1-conn/1-100mb-resp (aka. Download)/client: No change in performance detected.
       time:   [113.28 ms 120.00 ms 133.03 ms]
       thrpt:  [751.70 MiB/s 833.34 MiB/s 882.80 MiB/s]
change:
       time:   [-0.0167% +6.0692% +17.794%] (p = 0.24 > 0.05)
       thrpt:  [-15.106% -5.7219% +0.0167%]

Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high severe

1-conn/10_000-parallel-1b-resp (aka. RPS)/client: No change in performance detected.
       time:   [313.14 ms 316.62 ms 320.05 ms]
       thrpt:  [31.245 Kelem/s 31.584 Kelem/s 31.935 Kelem/s]
change:
       time:   [-0.3396% +1.3136% +2.9697%] (p = 0.11 > 0.05)
       thrpt:  [-2.8840% -1.2966% +0.3408%]
1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [33.975 ms 34.158 ms 34.353 ms]
       thrpt:  [29.110  elem/s 29.275  elem/s 29.433  elem/s]
change:
       time:   [-0.3069% +0.4794% +1.2889%] (p = 0.24 > 0.05)
       thrpt:  [-1.2725% -0.4771% +0.3079%]

Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
1 (1.00%) high mild
2 (2.00%) high severe

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing Mean [ms] Min [ms] Max [ms] Relative
msquic msquic 241.5 ± 127.2 102.0 588.1 1.00
neqo msquic reno on 257.5 ± 71.7 212.1 425.4 1.00
neqo msquic reno 258.7 ± 80.3 211.6 470.4 1.00
neqo msquic cubic on 290.9 ± 99.0 216.5 461.4 1.00
neqo msquic cubic 255.3 ± 81.7 206.2 467.9 1.00
msquic neqo reno on 171.7 ± 84.1 94.0 316.9 1.00
msquic neqo reno 189.3 ± 99.6 93.6 376.2 1.00
msquic neqo cubic on 161.2 ± 87.4 85.7 347.6 1.00
msquic neqo cubic 174.1 ± 105.3 90.0 390.3 1.00
neqo neqo reno on 211.5 ± 99.7 123.7 393.4 1.00
neqo neqo reno 226.1 ± 104.2 135.3 466.3 1.00
neqo neqo cubic on 189.9 ± 77.7 128.9 426.5 1.00
neqo neqo cubic 233.4 ± 107.2 138.1 550.1 1.00

⬇️ Download logs

@mxinden
Copy link
Collaborator Author

mxinden commented Oct 11, 2024

Is the size of the object a concern?

The size is 32 bytes. I would be surprised if this has a performance impact, especially in the context of making a syscall.

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants