-
Notifications
You must be signed in to change notification settings - Fork 456
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
Crossbeam channel slower than Go channels with input data delay #1029
Labels
Comments
I think it may be related to extra spinning. What about when using std::sync::mpsc? |
@taiki-e Also time close to crossbeam benchmark result but also twice slower than Go chan. |
cc @ibraheemdev |
@Jensanf do you have the numbers for the |
@ibraheemdev for std::sync::mpsc
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Hello,
I've been evaluating methods for fast data transfer between threads in Rust. After benchmark tests, I found that the crossbeam_channel appeared to be the most efficient mechanism in Rust, even outperforming Go channels on initial tests.
However, when introducing data with a delay, I observed that crossbeam_channel was significantly slower than Go channels.
Code:
Link to my Rust test code
Link to my Go test code
Benchmark Results:
Rust crossbeam:
Go channels:
Test Environment:
Crossbeam Version: 0.8
Machine: AMD Ryzen 7 5800H
Rust Version:
rustc 1.72.0 (5680fa18f 2023-08-23)
Go Version:
go1.21.1 linux/amd64
Is there a known reason for this behavior? I would like to understand if there's a way to reduce the delay on data transfer between channels in crossbeam or if there are recommended practices for managing when data has delays.
Thank you for your insights.
The text was updated successfully, but these errors were encountered: