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

perf: Optimize packet reception for the common case of adding to the end #1587

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

jesup
Copy link
Member

@jesup jesup commented Jan 26, 2024

Small optimization to avoid SmallVec and range in the common case of in-order data reception. Benchmarks on 100000 1337-byte packets shows a 4-7% improvement

martinthomson
martinthomson previously approved these changes Jan 26, 2024
neqo-transport/src/recv_stream.rs Outdated Show resolved Hide resolved
neqo-transport/src/recv_stream.rs Outdated Show resolved Hide resolved
neqo-transport/src/recv_stream.rs Outdated Show resolved Hide resolved
@jesup
Copy link
Member Author

jesup commented Feb 1, 2024

FYI, it's now about a 9% improvement on my system

@jesup
Copy link
Member Author

jesup commented Feb 1, 2024

Added benchmarks in PR 1609

@larseggert larseggert changed the title Optimize packet reception for the common case of adding to the end perf: Optimize packet reception for the common case of adding to the end Feb 1, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2024

Codecov Report

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

Comparison is base (72e670c) 87.44% compared to head (6a128bf) 87.44%.

Files Patch % Lines
neqo-transport/src/recv_stream.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1587   +/-   ##
=======================================
  Coverage   87.44%   87.44%           
=======================================
  Files         118      118           
  Lines       38674    38680    +6     
=======================================
+ Hits        33818    33824    +6     
  Misses       4856     4856           

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

@larseggert larseggert merged commit f1792ed into mozilla:main Feb 2, 2024
10 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.

4 participants