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(net): rewrite net bench and optimize #254

Merged
merged 8 commits into from
May 25, 2024

Conversation

Berrysoft
Copy link
Member

  • impl IoBuf for Rc & Arc
  • check is_empty before pop when using SegQueue
  • use scoped-tls instead of Weak tls
    • The idea is from monoio, who copies code of scoped-tls into its own codebase. It reduces time when getting current Runtime.

I also found that the cost of SendWrapper is significant, but it will be addressed by #252 .

The benchmark shows that on Linux, compio is 15% (14% with LTO, and 5% with faster SendWrapper) slower than tokio; on Windows, compio is 5% (18% with LTO) faster than tokio.

@Berrysoft Berrysoft added enhancement New feature or request package: runtime Related to compio-runtime performance Performance related (regression/optimization) labels May 21, 2024
@Berrysoft Berrysoft self-assigned this May 21, 2024
Copy link
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@George-Miao George-Miao merged commit 8429dc7 into compio-rs:master May 25, 2024
29 checks passed
@Berrysoft Berrysoft deleted the bench-improve branch May 25, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package: runtime Related to compio-runtime performance Performance related (regression/optimization)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants