Fibre MPSC benchmarks
many producers, one consumer
Throughput in Melem/s: Million items per second per item sent, median of samples. The best result in each row is highlighted. In batched tables, the bracketed figure is the gain over the same implementation's single-item row. A dash means the implementation has no channel for that cell. Measured on MacBook M4 Pro (14 cores).
sync
| Capacity | P×C | fibre | crossbeam | crossfire | flume | kanal | std |
|---|---|---|---|---|---|---|---|
| rendezvous | 1x1 | 0.545 | 0.528 | - | 0.443 | 6.42 | 0.527 |
| rendezvous | 16x1 | 0.665 | 0.179 | - | 0.211 | 1.38 | 0.177 |
| rendezvous | 64x1 | 0.560 | 0.168 | - | 0.193 | 0.390 | 0.164 |
| 1 | 1x1 | 7.05 | 8.25 | 10.8 | 0.668 | 10.1 | 0.277 |
| 1 | 16x1 | 1.17 | 0.188 | 1.83 | 0.211 | 2.17 | 0.237 |
| 1 | 64x1 | 1.17 | 0.166 | 0.586 | 0.213 | 0.522 | 0.233 |
| 128 | 1x1 | 75.8 | 43.5 | 27.9 | 29.2 | 24.8 | 44.7 |
| 128 | 16x1 | 33.9 | 11.2 | 8.09 | 0.219 | 1.02 | 0.213 |
| 128 | 64x1 | 30.9 | 0.275 | 6.01 | 0.213 | 0.322 | 0.200 |
| 1024 | 1x1 | 165.1 | 65.5 | 27.8 | 7.10 | 49.3 | 144.0 |
| 1024 | 16x1 | 20.9 | 13.6 | 14.3 | 0.249 | 1.19 | 0.247 |
| 1024 | 64x1 | 20.1 | 0.969 | 11.7 | 0.232 | 0.423 | 0.224 |
| unbounded | 1x1 | 228.9 | 143.6 | 154.6 | 9.85 | 144.4 | 133.3 |
| unbounded | 16x1 | 13.2 | 23.0 | 17.0 | 38.6 | 45.6 | 7.93 |
| unbounded | 64x1 | 36.3 | 30.8 | 32.9 | 42.3 | 11.3 | 9.71 |
sync, batched (512 items per call)
| Capacity | P×C | fibre | flume |
|---|---|---|---|
| 128 | 1x1 | 27.4 (0.4x) | 19.6 (0.7x) |
| 128 | 16x1 | 26.2 (0.8x) | 3.44 (15.7x) |
| 128 | 64x1 | 26.0 (0.8x) | 1.35 (6.4x) |
| 1024 | 1x1 | 278.4 (1.7x) | 73.0 (10.3x) |
| 1024 | 16x1 | 235.4 (11.3x) | 18.0 (72.2x) |
| 1024 | 64x1 | 247.1 (12.3x) | 6.53 (28.2x) |
| unbounded | 1x1 | 324.9 (1.4x) | 93.9 (9.5x) |
| unbounded | 16x1 | 214.5 (16.2x) | 47.5 (1.2x) |
| unbounded | 64x1 | 212.7 (5.9x) | 55.1 (1.3x) |
Native batch: fibre none, flume receive only.
async
| Capacity | P×C | fibre | async-channel | crossfire | flume | kanal | tokio |
|---|---|---|---|---|---|---|---|
| rendezvous | 1x1 | 26.0 | - | - | 7.45 | 23.0 | - |
| rendezvous | 16x1 | 6.96 | - | - | 0.991 | 4.57 | - |
| rendezvous | 64x1 | 3.96 | - | - | 0.608 | 2.65 | - |
| 1 | 1x1 | 9.48 | 3.83 | 3.81 | 7.36 | 29.1 | 8.37 |
| 1 | 16x1 | 8.19 | 1.76 | 0.563 | 0.929 | 20.9 | 7.86 |
| 1 | 64x1 | 6.92 | 1.79 | 0.471 | 0.605 | 10.8 | 6.88 |
| 128 | 1x1 | 64.4 | 24.0 | 69.8 | 38.3 | 78.9 | 33.2 |
| 128 | 16x1 | 65.1 | 3.66 | 11.4 | 4.02 | 9.13 | 6.07 |
| 128 | 64x1 | 62.7 | 1.34 | 7.31 | 1.05 | 8.67 | 2.49 |
| 1024 | 1x1 | 77.2 | 28.1 | 27.5 | 24.7 | 58.8 | 26.0 |
| 1024 | 16x1 | 77.6 | 8.07 | 13.0 | 5.95 | 2.45 | 6.12 |
| 1024 | 64x1 | 76.4 | 4.27 | 12.6 | 1.70 | 4.88 | 2.65 |
| unbounded | 1x1 | 109.2 | 30.0 | 109.2 | 60.5 | 105.2 | 63.4 |
| unbounded | 16x1 | 13.2 | 10.00 | 48.0 | 31.4 | 45.2 | 2.61 |
| unbounded | 64x1 | 12.8 | 9.42 | 17.0 | 32.2 | 22.5 | 2.45 |
Unreliable, sample spread over 2x on a 1×1 cell where the rest of the matrix holds within a few percent: crossfire at capacity 1 (2.7x, 2.19 to 5.90), crossfire at capacity 1024 (2.4x, 27.2 to 66.4). Those medians do not support a comparison.
async, batched (512 items per call)
| Capacity | P×C | fibre | flume | tokio |
|---|---|---|---|---|
| 128 | 1x1 | 222.9 (3.5x) | 49.2 (1.3x) | 44.1 (1.3x) |
| 128 | 16x1 | 214.5 (3.3x) | 7.39 (1.8x) | 2.94 (0.5x) |
| 128 | 64x1 | 198.6 (3.2x) | 4.66 (4.4x) | 2.38 (1.0x) |
| 1024 | 1x1 | 295.2 (3.8x) | 58.1 (2.4x) | 43.3 (1.7x) |
| 1024 | 16x1 | 290.7 (3.7x) | 18.5 (3.1x) | 2.26 (0.4x) |
| 1024 | 64x1 | 284.5 (3.7x) | 16.1 (9.5x) | 2.42 (0.9x) |
| unbounded | 1x1 | 190.9 (1.7x) | 93.0 (1.5x) | 110.9 (1.7x) |
| unbounded | 16x1 | 210.8 (15.9x) | 41.2 (1.3x) | 2.76 (1.1x) |
| unbounded | 64x1 | 204.3 (16.0x) | 43.6 (1.4x) | 2.09 (0.9x) |
Native batch: fibre none, flume receive only, tokio receive only.
