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

handshake: optimize AEAD handling for long header sealers and openers #4323

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

marten-seemann
Copy link
Member

Not a huge improvement, only slightly fewer allocs.

Part of #3663.

name                               old time/op    new time/op    delta
InitialAEADCreate-16                 4.78µs ± 5%    4.79µs ± 5%    ~     (p=0.927 n=10+10)
InitialAEAD/opening_100_bytes-16      116ns ± 2%     118ns ± 3%    ~     (p=0.116 n=8+10)
InitialAEAD/opening_1200_bytes-16     207ns ± 1%     208ns ± 3%    ~     (p=0.616 n=10+10)
InitialAEAD/sealing_100_bytes-16      111ns ± 3%     111ns ± 3%    ~     (p=0.764 n=9+10)
InitialAEAD/sealing_1200_bytes-16     206ns ± 2%     207ns ± 3%    ~     (p=0.424 n=10+10)

name                               old alloc/op   new alloc/op   delta
InitialAEADCreate-16                 10.5kB ± 0%    10.4kB ± 0%  -0.72%  (p=0.000 n=10+10)
InitialAEAD/opening_100_bytes-16      0.00B          0.00B         ~     (all equal)
InitialAEAD/opening_1200_bytes-16     0.00B          0.00B         ~     (all equal)
InitialAEAD/sealing_100_bytes-16      0.00B          0.00B         ~     (all equal)
InitialAEAD/sealing_1200_bytes-16     0.00B          0.00B         ~     (all equal)

name                               old allocs/op  new allocs/op  delta
InitialAEADCreate-16                    131 ± 0%       129 ± 0%  -1.53%  (p=0.000 n=10+10)
InitialAEAD/opening_100_bytes-16       0.00           0.00         ~     (all equal)
InitialAEAD/opening_1200_bytes-16      0.00           0.00         ~     (all equal)
InitialAEAD/sealing_100_bytes-16       0.00           0.00         ~     (all equal)
InitialAEAD/sealing_1200_bytes-16      0.00           0.00         ~     (all equal)

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (02e4506) 84.75% compared to head (d71943f) 84.72%.
Report is 1 commits behind head on master.

Files Patch % Lines
internal/handshake/aead.go 63.64% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4323      +/-   ##
==========================================
- Coverage   84.75%   84.72%   -0.03%     
==========================================
  Files         150      150              
  Lines       14250    14248       -2     
==========================================
- Hits        12077    12071       -6     
- Misses       1675     1677       +2     
- Partials      498      500       +2     

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

@marten-seemann marten-seemann merged commit 71f5ae5 into master Mar 3, 2024
34 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.

None yet

2 participants