I've developed a high-performance MPMC channel crate called Loole. This library offers a way to efficiently communicate between threads/tasks using channels.
Please take a look at this and let me know what you think.
Key Advantages:
Fast: Excels in high-contention environments with many concurrent producers and consumers. (Benchmark results are available in the GitHub repo)
Featureful: Unbounded, bounded and rendezvous channels
Safe: No unsafe code: #![forbid(unsafe_code)]!
Capable: Send and receive operations can be blocking (sync) or non-blocking (async)
Familiar: Compatible with the Flume's API
Simple: No dependencies, fast to compile
Please feel free to share your thoughts or any suggestions for improvement. I'm here to learn from the Rust community and make this library a valuable tool.
Thank you for your good questions! Let's address them one by one:
1. Unbounded Channel Benchmarks:
You're right, benchmarks for unbounded channels are missing. I intentionally omitted them from the README to keep it concise. Additionally, Unbounded channel benchmarks require a separate implementation (not done yet).
2. Payload Size (264 bytes):
I chose 264 bytes to simulate a medium-sized payload, something more substantial than just an integer. This helps evaluate performance with more realistic data.
3. Number of Senders (5000):
This is a valid point. 5,000 senders are indeed a high number for the non-async blocking case. My intention was to simulate a scenario with high contention for the channel.