Fibre MPMC benchmarks

many producers, many consumers, work-sharing

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

CapacityP×Cfibrecrossbeamcrossfireflumekanal
rendezvous1x10.5650.539-0.4486.33
rendezvous1x160.6150.168-0.5041.23
rendezvous1x640.5260.155-0.4620.463
rendezvous16x10.5190.165-0.1961.42
rendezvous16x160.5450.286-0.3301.43
rendezvous64x10.6350.167-0.2090.474
rendezvous64x640.5580.274-0.3391.54
11x11.697.0313.00.6494.28
11x160.1740.1892.130.5201.87
11x640.1740.1600.7210.5580.461
116x10.1790.1983.700.2161.58
116x160.1251.783.370.3541.12
164x10.1720.1631.270.2150.569
164x640.1061.654.760.3191.46
1281x139.735.7110.226.416.4
1281x169.9110.414.70.5305.58
1281x645.580.6248.200.5720.504
12816x18.8814.914.30.2101.53
12816x1618.821.421.83.622.87
12864x15.920.1989.310.2190.436
12864x6416.98.4818.72.293.71
10241x152.963.0238.06.5040.1
10241x1627.512.969.10.5454.44
10241x6420.412.831.20.5210.492
102416x124.217.531.90.2431.43
102416x1643.943.166.710.93.17
102464x119.05.9625.60.2330.502
102464x6436.016.149.47.374.24
unbounded1x1134.4143.7126.99.47137.7
unbounded1x160.50036.943.30.53920.7
unbounded1x640.44518.038.40.5360.411
unbounded16x112.023.322.743.213.6
unbounded16x169.7650.744.018.23.88
unbounded64x113.326.134.843.37.98
unbounded64x649.3646.644.515.33.68

Unreliable, sample spread over 2x on a 1×1 cell where the rest of the matrix holds within a few percent: fibre at capacity unbounded (2.8x, 48.4 to 137.5), flume at capacity unbounded (2.3x, 6.41 to 15.0). Those medians do not support a comparison.

sync, batched (512 items per call)

CapacityP×Cfibreflume
1281x1135.2 (3.4x)20.2 (0.8x)
1281x1612.1 (1.2x)0.474 (0.9x)
1281x6412.1 (2.2x)0.501 (0.9x)
12816x115.6 (1.8x)3.55 (16.9x)
12816x1629.5 (1.6x)4.83 (1.3x)
12864x18.65 (1.5x)1.39 (6.3x)
12864x6425.1 (1.5x)3.59 (1.6x)
10241x1216.5 (4.1x)72.4 (11.1x)
10241x1663.6 (2.3x)0.500 (0.9x)
10241x6438.7 (1.9x)0.487 (0.9x)
102416x165.1 (2.7x)18.0 (74.1x)
102416x16117.5 (2.7x)11.7 (1.1x)
102464x139.3 (2.1x)6.34 (27.2x)
102464x6492.3 (2.6x)8.34 (1.1x)
unbounded1x1225.6 (1.7x)106.8 (11.3x)
unbounded1x16101.4 (202.8x)0.474 (0.9x)
unbounded1x6491.1 (204.7x)0.478 (0.9x)
unbounded16x1203.2 (16.9x)49.4 (1.1x)
unbounded16x16157.3 (16.1x)12.8 (0.7x)
unbounded64x1202.2 (15.2x)57.3 (1.3x)
unbounded64x64151.2 (16.1x)14.1 (0.9x)

Native batch: fibre none, flume receive only.

async

CapacityP×Cfibreasync-channelcrossfireflumekanal
rendezvous1x125.4--7.1121.3
rendezvous1x167.05--1.456.24
rendezvous1x643.95--0.4610.981
rendezvous16x16.63--0.9296.14
rendezvous16x165.36--3.059.45
rendezvous64x14.12--0.5860.978
rendezvous64x644.77--2.8513.1
11x110.03.886.567.1628.2
11x167.801.710.6821.509.80
11x646.841.760.5760.4720.972
116x17.861.750.6820.89916.6
116x166.850.5541.122.6513.9
164x16.591.730.5660.60010.8
164x645.100.4461.052.9211.6
1281x157.024.272.338.176.3
1281x1620.33.4913.15.2614.2
1281x6410.31.069.430.9812.08
12816x118.53.5214.73.5222.3
12816x1623.77.158.5913.145.8
12864x17.111.249.380.98330.6
12864x6421.37.017.0813.19.65
10241x158.821.285.123.681.2
10241x1621.77.4816.36.896.44
10241x6415.02.2814.21.672.93
102416x120.47.3917.75.123.64
102416x1630.29.5114.716.37.66
102464x110.43.9515.61.439.16
102464x6425.79.6515.816.120.8
unbounded1x174.628.9101.250.2100.5
unbounded1x1629.017.129.27.416.58
unbounded1x6423.611.729.61.654.31
unbounded16x113.010.341.228.219.3
unbounded16x169.448.3331.115.07.96
unbounded64x111.99.8720.425.723.3
unbounded64x648.449.0429.616.410.4

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 (3.3x, 2.33 to 7.66). Those medians do not support a comparison.

async, batched (512 items per call)

CapacityP×Cfibreflume
1281x1155.4 (2.7x)54.6 (1.4x)
1281x1676.3 (3.8x)5.44 (1.0x)
1281x6429.0 (2.8x)0.744 (0.8x)
12816x158.5 (3.2x)7.40 (2.1x)
12816x1674.8 (3.2x)16.6 (1.3x)
12864x121.5 (3.0x)4.58 (4.7x)
12864x6472.0 (3.4x)16.1 (1.2x)
10241x1213.5 (3.6x)57.1 (2.4x)
10241x16130.8 (6.0x)7.78 (1.1x)
10241x6488.1 (5.9x)1.02 (0.6x)
102416x1115.1 (5.6x)18.1 (3.5x)
102416x16168.2 (5.6x)26.2 (1.6x)
102464x170.4 (6.8x)15.4 (10.7x)
102464x64164.8 (6.4x)24.9 (1.5x)
unbounded1x1182.9 (2.5x)87.6 (1.7x)
unbounded1x1691.3 (3.1x)7.95 (1.1x)
unbounded1x6493.2 (3.9x)1.06 (0.6x)
unbounded16x1201.7 (15.5x)39.1 (1.4x)
unbounded16x16125.2 (13.3x)17.9 (1.2x)
unbounded64x1203.1 (17.1x)38.3 (1.5x)
unbounded64x64118.2 (14.0x)26.3 (1.6x)

Native batch: fibre none, flume receive only.