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): remove useless Socket::send return value #1749

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Mar 15, 2024

Socket::send returns the number of Datagrams sent. Given that it only accepts a single Datagram to be send, this return value is at best useless and in the worst case confusing. It is ignored at all call sites.


Introduced in #1604. My bad. Sorry for the noise.

`Socket::send` returns the number of `Datagram`s sent. Given that it only
accepts a single `Datagram` to be send, this return value is at best useless and
in the worst case confusing.
Copy link

Benchmark results

Performance differences relative to 2750423.

  • coalesce_acked_from_zero 1+1 entries
    time: [254.14 ns 255.19 ns 256.82 ns]
    change: [-0.7895% -0.4172% +0.0780%] (p = 0.04 < 0.05)
    Change within noise threshold.

  • coalesce_acked_from_zero 3+1 entries
    time: [290.21 ns 290.94 ns 291.77 ns]
    change: [-0.5469% -0.2358% +0.0742%] (p = 0.13 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 10+1 entries
    time: [290.18 ns 291.47 ns 292.92 ns]
    change: [-1.1413% -0.5410% -0.0434%] (p = 0.05 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 1000+1 entries
    time: [267.32 ns 267.44 ns 267.60 ns]
    change: [-0.9423% -0.3758% +0.2188%] (p = 0.22 > 0.05)
    No change in performance detected.

  • RxStreamOrderer::inbound_frame()
    time: [125.73 ms 125.90 ms 126.15 ms]
    change: [-1.2696% -1.0398% -0.7892%] (p = 0.00 < 0.05)
    Change within noise threshold.

  • Run multiple transfers with varying seeds
    time: [189.43 ms 190.01 ms 190.58 ms]
    change: [-1.5510% -1.1153% -0.6858%] (p = 0.00 < 0.05)
    Change within noise threshold.

  • Run multiple transfers with the same seed
    time: [189.74 ms 190.11 ms 190.51 ms]
    change: [-1.5651% -1.2710% -0.9860%] (p = 0.00 < 0.05)
    Change within noise threshold.

⬇️ Download logs

@larseggert larseggert added this pull request to the merge queue Mar 15, 2024
Merged via the queue into mozilla:main with commit d2c7cbb Mar 15, 2024
13 checks passed
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