seq
: A single thread sendsN
messages. Then it receivesN
messages.spsc
: One thread sendsN
messages. Another thread receivesN
messages.mpsc
:T
threads sendN / T
messages each. One thread receivesN
messages.mpmc
:T
threads sendN / T
messages each.T
other threads receiveN / T
messages each.select_rx
:T
threads sendN / T
messages each into a separate channel. Another thread receivesN
messages by selecting over theT
channels.select_both
:T
threads sendN / T
messages each by selecting overT
channels.T
other threads receiveN / T
messages each by selecting over theT
channels.
Default configuration:
N = 5000000
T = 4
Runs benchmarks, stores results into *.txt
files, and generates plot.png
:
./run.sh
Dependencies:
- Rust
- Go
- Bash
- Python
- Matplotlib
Machine: Intel(R) Core(TM) i7-5500U (2 physical cores, 4 logical cores)
Rust: rustc 1.63.0 (4b91a6ea7 2022-08-08)
Go: go version go1.19 linux/amd64
Commit: 7070018
(2022-08-24)