-
Notifications
You must be signed in to change notification settings - Fork 741
Reduce small Vec<Enum>
uses in extensions
#2509
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
Conversation
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2509 +/- ##
==========================================
+ Coverage 95.29% 95.31% +0.01%
==========================================
Files 97 97
Lines 21470 21509 +39
==========================================
+ Hits 20460 20501 +41
+ Misses 1010 1008 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
caa112f
to
b5eb9ed
Compare
b5eb9ed
to
d0b3433
Compare
a63cb5d
to
a0523f1
Compare
This happens above, and yields the `PeerIncompatible::UncompressedEcPointsRequired` error. This second one is unreachable.
d0b3433
to
8410541
Compare
Instead, where possible, extract just the information we need during encoding.
"Where possible" -- specifically where the vector only encodes a peers capabilities rather than its preferences. This is true for both of these extensions, but for things like
signature_schemes
a different approach (that also retains the preference) would be needed.This reduces some complexity, but the main goal is reducing the size of the extensions struct:
sizeof(Option<Vec<PskKeyExchangeMode>>)
is 24 bytes, butsizeof(Option<PskKeyExchangeModes>)
is 2 bytes.This follows on from #2508 and #2502.