-
Notifications
You must be signed in to change notification settings - Fork 123
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: have process_input delegate to process_multiple_input #1792
Conversation
The `Connection::process_input` and `Connection::process_multiple_input` functions are identical, except that the latter handles multiple `Datagram`s. To avoid any changes to one without updating the other, have `process_input` simply delegate to `process_multiple_input`. Commit also does the equivalent change to `neqo_http3::Http3Client`.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1792 +/- ##
==========================================
+ Coverage 93.04% 93.12% +0.07%
==========================================
Files 116 116
Lines 36098 36097 -1
==========================================
+ Hits 33589 33614 +25
+ Misses 2509 2483 -26 ☔ View full report in Codecov by Sentry. |
Benchmark resultsPerformance differences relative to a33fe60.
Client/server transfer resultsTransfer of 134217728 bytes over loopback.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly sure that std::iter::once optimizes out well enough that this won't matter. We have far too much noise in benchmarks to notice, either way.
At this layer of the code, simply avoid duplication is worth the extra overhead.
The
Connection::process_input
andConnection::process_multiple_input
functions are identical, except that the latter handles multipleDatagram
s.To avoid any changes to one without updating the other, have
process_input
simply delegate toprocess_multiple_input
.Commit also does the equivalent change to
neqo_http3::Http3Client
.I would be surprised if
std::iter::once
adds a performance hit. Let's see what the benchmarks say.