macOS Benchmarks

Generated 2026-11-20 from corosio 893a69602155 — benchmark run. This page is fully generated; do not edit by hand (see the Benchmarks landing page).

Summary

Within noise means the relative difference is within twice the combined run-to-run noise (the root-sum-square of each side’s CV). Differences that small are indistinguishable from measurement jitter. See Methodology for how these figures are computed.

69 faster · 28 within noise · 16 slower of 113 benchmarks — median +63.6% vs Boost.Asio (callbacks) on the same reactor.

Summary — macOS ← slower · within noise · faster → per benchmark, vs Boost.Asio (callbacks) local_socket_throughput 24 benchmarks faster than asio (callbacks) 24 +483.1% local_socket_latency 12 benchmarks faster than asio (callbacks) 12 +96.4% socket_throughput 1 benchmark slower than asio (callbacks) 9 benchmarks within noise than asio (callbacks) 9 17 benchmarks faster than asio (callbacks) 17 +77.6% socket_latency 3 benchmarks within noise than asio (callbacks) 3 9 benchmarks faster than asio (callbacks) 9 +64.3% fan_out 8 benchmarks slower than asio (callbacks) 8 10 benchmarks within noise than asio (callbacks) 10 -0.3% http_server 6 benchmarks slower than asio (callbacks) 6 1 benchmark within noise than asio (callbacks) 4 benchmarks faster than asio (callbacks) 4 -2.4% accept_churn 1 benchmark slower than asio (callbacks) 5 benchmarks within noise than asio (callbacks) 5 3 benchmarks faster than asio (callbacks) 3 -5.5%

Test Environment

CPU

Apple M1

Cores

8

RAM (GB)

16

OS

Darwin 25.6.0

Kernel/build

Darwin Kernel Version 25.6.0: Tue Aug 18 17:48:35 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T8103

Compiler

Apple clang version 17.0.0 (clang-1700.6.3.2)

CMake

cmake version 4.4.3

liburing

n/a

Boost commit

b43db5cedbe534c2659c002fdee9e2e8040f1265

Asio commit

e99d9da6d9b76a222e29dcaf3d2df51c788b7527

Asio reactor

kqueue

Capy commit

6a9569060f999453e1f7b59cc9ae31c808c0778b

Corosio commit

893a69602155fb98b1b9340bb1e467502d0837e5

Corosio branch

develop

Date (UTC)

2026-11-19

Iterations

7

Duration per benchmark (s)

2.0

Results

accept_churn

Rate of setting up and tearing down short-lived TCP connections: connect, accept, close.

accept_churn — macOS ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -60% -40% -20% +20% +40% 0% burst/10 — N connects are fired at once, then all N are accepted before closing; N is the burst size. burst/10 — N connects are fired at once, then all N are accepted before closing; N is the burst size. burst/10 burst/100 — N connects are fired at once, then all N are accepted before closing; N is the burst size. burst/100 — N connects are fired at once, then all N are accepted before closing; N is the burst size. -39% burst/100 burst_lockless/10 — Same as burst, with the context in single-threaded lockless mode; N is the burst size. burst_lockless/10 — Same as burst, with the context in single-threaded lockless mode; N is the burst size. burst_lockless/10 burst_lockless/100 — Same as burst, with the context in single-threaded lockless mode; N is the burst size. -20% burst_lockless/100 — Same as burst, with the context in single-threaded lockless mode; N is the burst size. burst_lockless/100 concurrent/1 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/1 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/1 concurrent/16 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/16 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/16 concurrent/4 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/4 — N independent accept loops run on separate listeners at once, each doing a one-way one-byte transfer (client writes, server reads) per connection; N is the number of loops. concurrent/4 sequential — Single connect/accept/close loop with a one-way one-byte transfer (client writes, server reads) per connection, one connection at a time. sequential — Single connect/accept/close loop with a one-way one-byte transfer (client writes, server reads) per connection, one connection at a time. sequential sequential_lockless — Same as sequential, with the context in single-threaded lockless mode. +17% sequential_lockless — Same as sequential, with the context in single-threaded lockless mode. +0% sequential_lockless
Detailed results
Benchmark Implementation Median CV vs asio

burst/10

corosio (kqueue)

4.49K ops/s

2.49%

-6.4%

burst/10

asio (coroutines)

3.18K ops/s

1.60%

-33.7%

burst/10

asio (callbacks)

4.80K ops/s

2.95%

baseline

burst/100

corosio (kqueue)

450.0 ops/s

7.54%

-20.1%

burst/100

asio (coroutines)

342.5 ops/s

2.78%

-39.2%

burst/100

asio (callbacks)

563.0 ops/s

4.54%

baseline

burst_lockless/10

corosio (kqueue)

4.56K ops/s

8.59%

-1.4%

burst_lockless/10

asio (coroutines)

3.21K ops/s

1.98%

-30.8%

burst_lockless/10

asio (callbacks)

4.63K ops/s

10.56%

baseline

burst_lockless/100

corosio (kqueue)

452.3 ops/s

5.46%

-20.1%

burst_lockless/100

asio (coroutines)

349.5 ops/s

2.52%

-38.3%

burst_lockless/100

asio (callbacks)

566.4 ops/s

15.76%

baseline

concurrent/1

corosio (kqueue)

20.71K ops/s

0.80%

+15.9%

concurrent/1

asio (coroutines)

17.78K ops/s

0.95%

-0.5%

concurrent/1

asio (callbacks)

17.88K ops/s

0.52%

baseline

concurrent/16

corosio (kqueue)

37.75K ops/s

2.02%

-8.5%

concurrent/16

asio (coroutines)

40.55K ops/s

4.57%

-1.7%

concurrent/16

asio (callbacks)

41.27K ops/s

6.57%

baseline

concurrent/4

corosio (kqueue)

29.06K ops/s

1.14%

-5.5%

concurrent/4

asio (coroutines)

30.21K ops/s

2.82%

-1.8%

concurrent/4

asio (callbacks)

30.75K ops/s

3.04%

baseline

sequential

corosio (kqueue)

20.60K ops/s

1.05%

+13.7%

sequential

asio (coroutines)

17.88K ops/s

1.17%

-1.3%

sequential

asio (callbacks)

18.12K ops/s

0.41%

baseline

sequential_lockless

corosio (kqueue)

20.88K ops/s

0.65%

+17.4%

sequential_lockless

asio (coroutines)

17.82K ops/s

1.31%

+0.2%

sequential_lockless

asio (callbacks)

17.78K ops/s

0.50%

baseline


fan_out

Fan-out/fan-in coroutine coordination: a parent starts concurrent sub-requests against echo servers and awaits their completion via a shared latch.

fan_out — macOS, part 1 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -40% -20% +20% +40% +60% 0% concurrent_parents/1 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. +0% concurrent_parents/1 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -11% concurrent_parents/1 concurrent_parents/16 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. +13% concurrent_parents/16 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -19% concurrent_parents/16 concurrent_parents/4 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -9% concurrent_parents/4 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -3% concurrent_parents/4 concurrent_parents_lockless/1 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. +1% concurrent_parents_lockless/1 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -11% concurrent_parents_lockless/1 concurrent_parents_lockless/16 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. +41% concurrent_parents_lockless/16 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. +38% concurrent_parents_lockless/16 concurrent_parents_lockless/4 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -9% concurrent_parents_lockless/4 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -3% concurrent_parents_lockless/4
Detailed results
Benchmark Implementation Median CV vs asio

concurrent_parents/1

corosio (kqueue)

8.14K ops/s

0.71%

+0.4%

concurrent_parents/1

asio (coroutines)

7.25K ops/s

0.38%

-10.6%

concurrent_parents/1

asio (callbacks)

8.11K ops/s

0.80%

baseline

concurrent_parents/16

corosio (kqueue)

8.73K ops/s

17.61%

+12.6%

concurrent_parents/16

asio (coroutines)

6.31K ops/s

19.80%

-18.7%

concurrent_parents/16

asio (callbacks)

7.76K ops/s

21.69%

baseline

concurrent_parents/4

corosio (kqueue)

8.21K ops/s

2.07%

-8.7%

concurrent_parents/4

asio (coroutines)

8.72K ops/s

1.00%

-3.0%

concurrent_parents/4

asio (callbacks)

8.99K ops/s

0.15%

baseline

concurrent_parents_lockless/1

corosio (kqueue)

8.24K ops/s

0.79%

+0.5%

concurrent_parents_lockless/1

asio (coroutines)

7.31K ops/s

0.37%

-10.8%

concurrent_parents_lockless/1

asio (callbacks)

8.20K ops/s

0.59%

baseline

concurrent_parents_lockless/16

corosio (kqueue)

8.82K ops/s

13.72%

+40.8%

concurrent_parents_lockless/16

asio (coroutines)

8.63K ops/s

19.35%

+37.7%

concurrent_parents_lockless/16

asio (callbacks)

6.27K ops/s

23.71%

baseline

concurrent_parents_lockless/4

corosio (kqueue)

8.29K ops/s

2.13%

-8.9%

concurrent_parents_lockless/4

asio (coroutines)

8.84K ops/s

1.03%

-2.9%

concurrent_parents_lockless/4

asio (callbacks)

9.11K ops/s

0.92%

baseline

fan_out — macOS, part 2 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -80% -60% -40% -20% +20% 0% fork_join/1 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/1 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/1 fork_join/16 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. +1% fork_join/16 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/16 fork_join/4 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/4 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/4 fork_join/64 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. fork_join/64 — One parent starts N sub-requests to echo servers and waits for all to finish before repeating; N is the fan-out width. -4% fork_join/64 fork_join_lockless/1 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. -22% fork_join_lockless/1 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. -54% fork_join_lockless/1 fork_join_lockless/16 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/16 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/16 fork_join_lockless/4 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/4 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/4 fork_join_lockless/64 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/64 — Same as fork_join, with the context in single-threaded lockless mode; N is the fan-out width. fork_join_lockless/64 nested/16 — Two-level fan-out: the parent starts N groups of 4 sub-requests each, each group awaited via its own latch; N is the number of groups. nested/16 — Two-level fan-out: the parent starts N groups of 4 sub-requests each, each group awaited via its own latch; N is the number of groups. nested/16 nested/4 — Two-level fan-out: the parent starts N groups of 4 sub-requests each, each group awaited via its own latch; N is the number of groups. nested/4 — Two-level fan-out: the parent starts N groups of 4 sub-requests each, each group awaited via its own latch; N is the number of groups. nested/4 nested_lockless/16 — Same as nested, with the context in single-threaded lockless mode; N is the number of groups. nested_lockless/16 — Same as nested, with the context in single-threaded lockless mode; N is the number of groups. nested_lockless/16 nested_lockless/4 — Same as nested, with the context in single-threaded lockless mode; N is the number of groups. nested_lockless/4 — Same as nested, with the context in single-threaded lockless mode; N is the number of groups. nested_lockless/4
Detailed results
Benchmark Implementation Median CV vs asio

fork_join/1

corosio (kqueue)

49.74K ops/s

0.95%

-18.4%

fork_join/1

asio (coroutines)

29.15K ops/s

0.76%

-52.2%

fork_join/1

asio (callbacks)

60.99K ops/s

1.29%

baseline

fork_join/16

corosio (kqueue)

8.16K ops/s

0.58%

+1.2%

fork_join/16

asio (coroutines)

7.27K ops/s

0.32%

-9.8%

fork_join/16

asio (callbacks)

8.06K ops/s

0.72%

baseline

fork_join/4

corosio (kqueue)

23.69K ops/s

0.80%

+1.1%

fork_join/4

asio (coroutines)

16.96K ops/s

0.27%

-27.6%

fork_join/4

asio (callbacks)

23.43K ops/s

0.46%

baseline

fork_join/64

corosio (kqueue)

2.15K ops/s

2.06%

-5.0%

fork_join/64

asio (coroutines)

2.16K ops/s

1.52%

-4.4%

fork_join/64

asio (callbacks)

2.26K ops/s

0.63%

baseline

fork_join_lockless/1

corosio (kqueue)

50.28K ops/s

0.36%

-21.8%

fork_join_lockless/1

asio (coroutines)

29.78K ops/s

0.50%

-53.7%

fork_join_lockless/1

asio (callbacks)

64.31K ops/s

0.46%

baseline

fork_join_lockless/16

corosio (kqueue)

8.24K ops/s

0.70%

+0.4%

fork_join_lockless/16

asio (coroutines)

7.33K ops/s

0.41%

-10.7%

fork_join_lockless/16

asio (callbacks)

8.21K ops/s

0.65%

baseline

fork_join_lockless/4

corosio (kqueue)

23.79K ops/s

0.43%

+0.5%

fork_join_lockless/4

asio (coroutines)

17.02K ops/s

0.18%

-28.1%

fork_join_lockless/4

asio (callbacks)

23.67K ops/s

0.45%

baseline

fork_join_lockless/64

corosio (kqueue)

2.11K ops/s

2.36%

-7.6%

fork_join_lockless/64

asio (coroutines)

2.14K ops/s

1.60%

-6.5%

fork_join_lockless/64

asio (callbacks)

2.28K ops/s

0.66%

baseline

nested/16

corosio (kqueue)

2.06K ops/s

2.31%

-8.4%

nested/16

asio (coroutines)

2.04K ops/s

0.84%

-9.5%

nested/16

asio (callbacks)

2.25K ops/s

0.33%

baseline

nested/4

corosio (kqueue)

8.09K ops/s

0.73%

-0.2%

nested/4

asio (coroutines)

6.59K ops/s

0.61%

-18.8%

nested/4

asio (callbacks)

8.11K ops/s

0.81%

baseline

nested_lockless/16

corosio (kqueue)

2.08K ops/s

2.51%

-8.6%

nested_lockless/16

asio (coroutines)

2.07K ops/s

0.86%

-9.1%

nested_lockless/16

asio (callbacks)

2.28K ops/s

0.58%

baseline

nested_lockless/4

corosio (kqueue)

8.17K ops/s

1.14%

-0.4%

nested_lockless/4

asio (coroutines)

6.65K ops/s

0.50%

-18.9%

nested_lockless/4

asio (callbacks)

8.20K ops/s

0.72%

baseline


http_server

Request/response throughput of a minimal HTTP/1.1 server exchanging a fixed small request and canned response over persistent TCP loopback connections.

http_server — macOS ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -40% -20% +20% +40% 0% concurrent/1 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/1 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/1 concurrent/16 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/16 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/16 concurrent/32 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/32 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/32 concurrent/4 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/4 — N client/server pairs run the single_conn request/response loop concurrently; N is the number of connections. concurrent/4 multithread/1 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/1 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/1 multithread/16 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. +16% multithread/16 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. -1% multithread/16 multithread/2 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/2 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/2 multithread/4 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/4 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/4 multithread/8 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/8 — 32 client/server pairs share one context serviced by N threads running the context; N is the thread count. multithread/8 single_conn — One client repeatedly sends a fixed small HTTP request to one server and reads the response. single_conn — One client repeatedly sends a fixed small HTTP request to one server and reads the response. -5% single_conn single_conn_lockless — Same as single_conn, with the context in single-threaded lockless mode. -22% single_conn_lockless — Same as single_conn, with the context in single-threaded lockless mode. single_conn_lockless
Detailed results
Benchmark Implementation Median CV vs asio

concurrent/1

corosio (kqueue)

49.53K ops/s

0.35%

-20.5%

concurrent/1

asio (coroutines)

59.11K ops/s

0.54%

-5.1%

concurrent/1

asio (callbacks)

62.31K ops/s

1.39%

baseline

concurrent/16

corosio (kqueue)

130.8K ops/s

0.57%

+1.2%

concurrent/16

asio (coroutines)

127.7K ops/s

0.66%

-1.2%

concurrent/16

asio (callbacks)

129.3K ops/s

0.67%

baseline

concurrent/32

corosio (kqueue)

130.6K ops/s

1.11%

-6.5%

concurrent/32

asio (coroutines)

136.8K ops/s

0.43%

-2.0%

concurrent/32

asio (callbacks)

139.6K ops/s

0.54%

baseline

concurrent/4

corosio (kqueue)

90.63K ops/s

1.05%

-2.4%

concurrent/4

asio (coroutines)

91.96K ops/s

0.18%

-0.9%

concurrent/4

asio (callbacks)

92.83K ops/s

0.28%

baseline

multithread/1

corosio (kqueue)

130.4K ops/s

1.14%

-6.5%

multithread/1

asio (coroutines)

136.9K ops/s

0.48%

-1.8%

multithread/1

asio (callbacks)

139.4K ops/s

0.62%

baseline

multithread/16

corosio (kqueue)

132.7K ops/s

0.47%

+16.1%

multithread/16

asio (coroutines)

113.5K ops/s

1.19%

-0.7%

multithread/16

asio (callbacks)

114.3K ops/s

1.36%

baseline

multithread/2

corosio (kqueue)

184.4K ops/s

0.23%

+8.4%

multithread/2

asio (coroutines)

168.6K ops/s

0.23%

-0.9%

multithread/2

asio (callbacks)

170.2K ops/s

0.30%

baseline

multithread/4

corosio (kqueue)

163.0K ops/s

0.57%

+12.1%

multithread/4

asio (coroutines)

143.6K ops/s

0.17%

-1.2%

multithread/4

asio (callbacks)

145.3K ops/s

0.18%

baseline

multithread/8

corosio (kqueue)

139.4K ops/s

1.32%

+5.7%

multithread/8

asio (coroutines)

129.7K ops/s

1.03%

-1.6%

multithread/8

asio (callbacks)

131.8K ops/s

0.61%

baseline

single_conn

corosio (kqueue)

49.60K ops/s

0.25%

-20.3%

single_conn

asio (coroutines)

59.01K ops/s

0.84%

-5.2%

single_conn

asio (callbacks)

62.24K ops/s

1.16%

baseline

single_conn_lockless

corosio (kqueue)

49.91K ops/s

0.50%

-22.2%

single_conn_lockless

asio (coroutines)

61.81K ops/s

0.61%

-3.6%

single_conn_lockless

asio (callbacks)

64.12K ops/s

0.90%

baseline


local_socket_latency

Round-trip latency of a single Unix domain stream socket write/read exchange across message sizes and concurrent pair counts.

local_socket_latency — macOS ↑ faster (lower mean latency) · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -50% +50% +100% +150% 0% concurrent/1 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/1 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/1 concurrent/16 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/16 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. -4% concurrent/16 concurrent/4 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/4 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/4 concurrent_lockless/1 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. +97% concurrent_lockless/1 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/1 concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. +64% concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/16 concurrent_lockless/4 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/4 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. +0% concurrent_lockless/4 pingpong/1 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1 pingpong/1024 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1024 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1024 pingpong/64 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/64 — One connected Unix domain socket pair ping-pongs a message client->server->client; N is the message size in bytes. pingpong/64 pingpong_lockless/1 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1 pingpong_lockless/1024 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1024 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1024 pingpong_lockless/64 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/64 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/64
Detailed results
Benchmark Implementation Median CV vs asio

concurrent/1

corosio (kqueue)

1.71 µs

0.30%

+96.5%

concurrent/1

asio (coroutines)

48.62 µs

0.06%

-0.0%

concurrent/1

asio (callbacks)

48.62 µs

0.14%

baseline

concurrent/16

corosio (kqueue)

26.77 µs

0.47%

+63.8%

concurrent/16

asio (coroutines)

76.96 µs

0.84%

-4.1%

concurrent/16

asio (callbacks)

73.92 µs

0.43%

baseline

concurrent/4

corosio (kqueue)

6.67 µs

0.38%

+87.9%

concurrent/4

asio (coroutines)

55.65 µs

0.25%

-0.6%

concurrent/4

asio (callbacks)

55.30 µs

0.48%

baseline

concurrent_lockless/1

corosio (kqueue)

1.69 µs

0.48%

+96.5%

concurrent_lockless/1

asio (coroutines)

48.63 µs

0.04%

+0.0%

concurrent_lockless/1

asio (callbacks)

48.63 µs

0.04%

baseline

concurrent_lockless/16

corosio (kqueue)

26.55 µs

0.65%

+63.6%

concurrent_lockless/16

asio (coroutines)

75.55 µs

0.75%

-3.5%

concurrent_lockless/16

asio (callbacks)

73.01 µs

0.39%

baseline

concurrent_lockless/4

corosio (kqueue)

6.60 µs

0.41%

+88.1%

concurrent_lockless/4

asio (coroutines)

55.37 µs

0.44%

+0.1%

concurrent_lockless/4

asio (callbacks)

55.40 µs

0.19%

baseline

pingpong/1

corosio (kqueue)

1.70 µs

0.27%

+96.5%

pingpong/1

asio (coroutines)

48.62 µs

0.05%

+0.0%

pingpong/1

asio (callbacks)

48.64 µs

0.03%

baseline

pingpong/1024

corosio (kqueue)

1.80 µs

0.36%

+96.3%

pingpong/1024

asio (coroutines)

48.64 µs

0.05%

-0.0%

pingpong/1024

asio (callbacks)

48.62 µs

0.05%

baseline

pingpong/64

corosio (kqueue)

1.71 µs

0.19%

+96.5%

pingpong/64

asio (coroutines)

48.62 µs

0.11%

+0.0%

pingpong/64

asio (callbacks)

48.62 µs

0.04%

baseline

pingpong_lockless/1

corosio (kqueue)

1.69 µs

0.26%

+96.5%

pingpong_lockless/1

asio (coroutines)

48.61 µs

0.03%

+0.0%

pingpong_lockless/1

asio (callbacks)

48.61 µs

0.12%

baseline

pingpong_lockless/1024

corosio (kqueue)

1.79 µs

0.55%

+96.3%

pingpong_lockless/1024

asio (coroutines)

48.64 µs

0.08%

-0.0%

pingpong_lockless/1024

asio (callbacks)

48.63 µs

0.12%

baseline

pingpong_lockless/64

corosio (kqueue)

1.69 µs

0.29%

+96.5%

pingpong_lockless/64

asio (coroutines)

48.61 µs

0.07%

-0.0%

pingpong_lockless/64

asio (callbacks)

48.61 µs

0.03%

baseline


local_socket_throughput

Sustained byte throughput of a Unix domain stream socket pair under continuous streaming across chunk sizes and directions.

local_socket_throughput — macOS, part 1 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -500% +500% +1000% 0% bidirectional/1024 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/1024 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/1024 bidirectional/1048576 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/1048576 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/1048576 bidirectional/16384 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/16384 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/16384 bidirectional/262144 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/262144 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/262144 bidirectional/4096 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/4096 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/4096 bidirectional/65536 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/65536 — Both ends of the socket pair write and read simultaneously; N is the chunk size in bytes. bidirectional/65536 bidirectional_lockless/1024 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +772% bidirectional_lockless/1024 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. 0% bidirectional_lockless/1024 bidirectional_lockless/1048576 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/1048576 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/1048576 bidirectional_lockless/16384 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/16384 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/16384 bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +231% bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -8% bidirectional_lockless/262144 bidirectional_lockless/4096 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/4096 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/4096 bidirectional_lockless/65536 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/65536 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

bidirectional/1024

corosio (kqueue)

1.32 GB/s

0.31%

+770.3%

bidirectional/1024

asio (coroutines)

151.7 MB/s

0.02%

-0.1%

bidirectional/1024

asio (callbacks)

151.8 MB/s

0.11%

baseline

bidirectional/1048576

corosio (kqueue)

3.91 GB/s

0.41%

+250.1%

bidirectional/1048576

asio (coroutines)

1.11 GB/s

0.05%

-0.9%

bidirectional/1048576

asio (callbacks)

1.12 GB/s

0.86%

baseline

bidirectional/16384

corosio (kqueue)

3.93 GB/s

0.77%

+252.4%

bidirectional/16384

asio (coroutines)

1.11 GB/s

0.03%

-0.8%

bidirectional/16384

asio (callbacks)

1.12 GB/s

0.65%

baseline

bidirectional/262144

corosio (kqueue)

3.92 GB/s

0.54%

+252.3%

bidirectional/262144

asio (coroutines)

1.11 GB/s

0.05%

-0.6%

bidirectional/262144

asio (callbacks)

1.11 GB/s

0.77%

baseline

bidirectional/4096

corosio (kqueue)

2.93 GB/s

0.56%

+383.7%

bidirectional/4096

asio (coroutines)

605.7 MB/s

0.05%

-0.2%

bidirectional/4096

asio (callbacks)

606.8 MB/s

0.06%

baseline

bidirectional/65536

corosio (kqueue)

3.91 GB/s

0.69%

+249.4%

bidirectional/65536

asio (coroutines)

1.11 GB/s

0.03%

-1.1%

bidirectional/65536

asio (callbacks)

1.12 GB/s

0.56%

baseline

bidirectional_lockless/1024

corosio (kqueue)

1.32 GB/s

0.38%

+772.3%

bidirectional_lockless/1024

asio (coroutines)

151.8 MB/s

0.03%

-0.1%

bidirectional_lockless/1024

asio (callbacks)

151.9 MB/s

0.05%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

3.99 GB/s

0.65%

+235.1%

bidirectional_lockless/1048576

asio (coroutines)

1.11 GB/s

0.07%

-7.1%

bidirectional_lockless/1048576

asio (callbacks)

1.19 GB/s

1.67%

baseline

bidirectional_lockless/16384

corosio (kqueue)

4.01 GB/s

0.77%

+236.8%

bidirectional_lockless/16384

asio (coroutines)

1.11 GB/s

0.29%

-6.9%

bidirectional_lockless/16384

asio (callbacks)

1.19 GB/s

1.19%

baseline

bidirectional_lockless/262144

corosio (kqueue)

3.98 GB/s

0.54%

+231.4%

bidirectional_lockless/262144

asio (coroutines)

1.11 GB/s

0.04%

-7.7%

bidirectional_lockless/262144

asio (callbacks)

1.20 GB/s

1.89%

baseline

bidirectional_lockless/4096

corosio (kqueue)

2.98 GB/s

0.54%

+391.2%

bidirectional_lockless/4096

asio (coroutines)

606.2 MB/s

0.05%

-0.1%

bidirectional_lockless/4096

asio (callbacks)

606.9 MB/s

0.12%

baseline

bidirectional_lockless/65536

corosio (kqueue)

3.99 GB/s

0.34%

+235.7%

bidirectional_lockless/65536

asio (coroutines)

1.11 GB/s

0.07%

-6.9%

bidirectional_lockless/65536

asio (callbacks)

1.19 GB/s

1.76%

baseline

local_socket_throughput — macOS, part 2 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -500% +500% +1000% +1500% +2000% 0% unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. +1530% unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/1024 unidirectional/1048576 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. +483% unidirectional/1048576 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. 0% unidirectional/1048576 unidirectional/16384 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/16384 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/16384 unidirectional/262144 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/262144 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/262144 unidirectional/4096 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/4096 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/4096 unidirectional/65536 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/65536 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/65536 unidirectional_lockless/1024 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/1024 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -6% unidirectional_lockless/1024 unidirectional_lockless/1048576 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/1048576 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/1048576 unidirectional_lockless/16384 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/16384 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/16384 unidirectional_lockless/262144 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/262144 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/262144 unidirectional_lockless/4096 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/4096 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/4096 unidirectional_lockless/65536 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/65536 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

unidirectional/1024

corosio (kqueue)

1.32 GB/s

0.42%

+1530.4%

unidirectional/1024

asio (coroutines)

76.82 MB/s

0.89%

-4.8%

unidirectional/1024

asio (callbacks)

80.71 MB/s

1.19%

baseline

unidirectional/1048576

corosio (kqueue)

3.55 GB/s

0.70%

+482.8%

unidirectional/1048576

asio (coroutines)

608.4 MB/s

0.03%

-0.0%

unidirectional/1048576

asio (callbacks)

608.5 MB/s

0.03%

baseline

unidirectional/16384

corosio (kqueue)

3.55 GB/s

0.46%

+483.1%

unidirectional/16384

asio (coroutines)

608.4 MB/s

0.04%

-0.0%

unidirectional/16384

asio (callbacks)

608.6 MB/s

0.05%

baseline

unidirectional/262144

corosio (kqueue)

3.55 GB/s

0.23%

+483.1%

unidirectional/262144

asio (coroutines)

608.4 MB/s

0.03%

-0.0%

unidirectional/262144

asio (callbacks)

608.6 MB/s

0.03%

baseline

unidirectional/4096

corosio (kqueue)

2.72 GB/s

0.47%

+793.1%

unidirectional/4096

asio (coroutines)

304.5 MB/s

0.02%

-0.1%

unidirectional/4096

asio (callbacks)

304.9 MB/s

0.10%

baseline

unidirectional/65536

corosio (kqueue)

3.55 GB/s

0.25%

+483.2%

unidirectional/65536

asio (coroutines)

608.2 MB/s

0.11%

-0.1%

unidirectional/65536

asio (callbacks)

608.6 MB/s

0.02%

baseline

unidirectional_lockless/1024

corosio (kqueue)

1.32 GB/s

0.57%

+1474.2%

unidirectional_lockless/1024

asio (coroutines)

78.75 MB/s

1.32%

-5.8%

unidirectional_lockless/1024

asio (callbacks)

83.58 MB/s

0.15%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

3.61 GB/s

0.37%

+492.3%

unidirectional_lockless/1048576

asio (coroutines)

608.4 MB/s

0.02%

-0.0%

unidirectional_lockless/1048576

asio (callbacks)

608.6 MB/s

0.04%

baseline

unidirectional_lockless/16384

corosio (kqueue)

3.61 GB/s

0.42%

+493.3%

unidirectional_lockless/16384

asio (coroutines)

608.5 MB/s

0.02%

-0.0%

unidirectional_lockless/16384

asio (callbacks)

608.7 MB/s

0.04%

baseline

unidirectional_lockless/262144

corosio (kqueue)

3.60 GB/s

0.23%

+491.4%

unidirectional_lockless/262144

asio (coroutines)

608.6 MB/s

0.08%

-0.0%

unidirectional_lockless/262144

asio (callbacks)

608.7 MB/s

0.06%

baseline

unidirectional_lockless/4096

corosio (kqueue)

2.76 GB/s

0.40%

+785.4%

unidirectional_lockless/4096

asio (coroutines)

304.6 MB/s

0.09%

-2.4%

unidirectional_lockless/4096

asio (callbacks)

312.1 MB/s

0.63%

baseline

unidirectional_lockless/65536

corosio (kqueue)

3.61 GB/s

0.55%

+492.5%

unidirectional_lockless/65536

asio (coroutines)

608.5 MB/s

0.06%

-0.0%

unidirectional_lockless/65536

asio (callbacks)

608.7 MB/s

0.01%

baseline


socket_latency

Round-trip latency of a TCP loopback connection. Each sample is one full round trip (request out, reply back) across message sizes and concurrent pair counts.

socket_latency — macOS ↑ faster (lower mean latency) · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -50% +50% +100% 0% concurrent/1 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/1 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/1 concurrent/16 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/16 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. +4% concurrent/16 concurrent/4 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/4 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. concurrent/4 concurrent_lockless/1 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/1 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/1 concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. +4% concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/16 concurrent_lockless/4 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. concurrent_lockless/4 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. -19% concurrent_lockless/4 pingpong/1 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1 pingpong/1024 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1024 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/1024 pingpong/64 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/64 — One TCP connection ping-pongs a message client->server->client; N is the message size in bytes. pingpong/64 pingpong_lockless/1 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. +68% pingpong_lockless/1 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1 pingpong_lockless/1024 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1024 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/1024 pingpong_lockless/64 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/64 — Same as pingpong, with the context in single-threaded lockless mode; N is the message size in bytes. pingpong_lockless/64
Detailed results
Benchmark Implementation Median CV vs asio

concurrent/1

corosio (kqueue)

18.69 µs

0.37%

+64.8%

concurrent/1

asio (coroutines)

53.44 µs

3.74%

-0.6%

concurrent/1

asio (callbacks)

53.14 µs

3.40%

baseline

concurrent/16

corosio (kqueue)

121.62 µs

1.05%

+6.6%

concurrent/16

asio (coroutines)

125.07 µs

7.15%

+4.0%

concurrent/16

asio (callbacks)

130.27 µs

6.20%

baseline

concurrent/4

corosio (kqueue)

43.08 µs

1.09%

+38.1%

concurrent/4

asio (coroutines)

74.31 µs

9.34%

-6.9%

concurrent/4

asio (callbacks)

69.54 µs

15.28%

baseline

concurrent_lockless/1

corosio (kqueue)

18.63 µs

0.19%

+61.6%

concurrent_lockless/1

asio (coroutines)

52.07 µs

3.99%

-7.3%

concurrent_lockless/1

asio (callbacks)

48.55 µs

7.97%

baseline

concurrent_lockless/16

corosio (kqueue)

121.49 µs

1.05%

+3.9%

concurrent_lockless/16

asio (coroutines)

141.19 µs

7.47%

-11.7%

concurrent_lockless/16

asio (callbacks)

126.44 µs

6.83%

baseline

concurrent_lockless/4

corosio (kqueue)

42.40 µs

0.53%

+30.6%

concurrent_lockless/4

asio (coroutines)

72.75 µs

15.91%

-19.1%

concurrent_lockless/4

asio (callbacks)

61.07 µs

16.85%

baseline

pingpong/1

corosio (kqueue)

15.35 µs

0.90%

+67.9%

pingpong/1

asio (coroutines)

49.12 µs

5.22%

-2.6%

pingpong/1

asio (callbacks)

47.87 µs

1.93%

baseline

pingpong/1024

corosio (kqueue)

19.02 µs

0.25%

+64.9%

pingpong/1024

asio (coroutines)

56.62 µs

9.27%

-4.6%

pingpong/1024

asio (callbacks)

54.13 µs

4.84%

baseline

pingpong/64

corosio (kqueue)

18.72 µs

0.32%

+63.8%

pingpong/64

asio (coroutines)

55.79 µs

4.94%

-7.8%

pingpong/64

asio (callbacks)

51.76 µs

7.27%

baseline

pingpong_lockless/1

corosio (kqueue)

15.32 µs

0.11%

+68.0%

pingpong_lockless/1

asio (coroutines)

50.86 µs

6.44%

-6.3%

pingpong_lockless/1

asio (callbacks)

47.85 µs

6.17%

baseline

pingpong_lockless/1024

corosio (kqueue)

18.97 µs

0.10%

+65.3%

pingpong_lockless/1024

asio (coroutines)

54.64 µs

3.96%

+0.1%

pingpong_lockless/1024

asio (callbacks)

54.72 µs

3.20%

baseline

pingpong_lockless/64

corosio (kqueue)

18.61 µs

0.49%

+66.8%

pingpong_lockless/64

asio (coroutines)

56.19 µs

6.96%

-0.3%

pingpong_lockless/64

asio (callbacks)

56.02 µs

7.79%

baseline


socket_throughput

Sustained byte throughput of a TCP loopback connection under continuous streaming, varying chunk size, direction, and concurrency.

socket_throughput — macOS, part 1 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -100% +100% +200% 0% bidirectional/1024 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. +138% bidirectional/1024 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/1024 bidirectional/1048576 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. -8% bidirectional/1048576 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/1048576 bidirectional/16384 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/16384 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/16384 bidirectional/262144 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/262144 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. -20% bidirectional/262144 bidirectional/4096 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/4096 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/4096 bidirectional/65536 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/65536 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. bidirectional/65536 bidirectional_lockless/1024 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/1024 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/1024 bidirectional_lockless/1048576 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/1048576 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +1% bidirectional_lockless/1048576 bidirectional_lockless/16384 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/16384 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/16384 bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/262144 bidirectional_lockless/4096 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/4096 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/4096 bidirectional_lockless/65536 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/65536 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. bidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

bidirectional/1024

corosio (kqueue)

482.2 MB/s

0.73%

+138.0%

bidirectional/1024

asio (coroutines)

203.2 MB/s

0.72%

+0.3%

bidirectional/1024

asio (callbacks)

202.6 MB/s

0.70%

baseline

bidirectional/1048576

corosio (kqueue)

7.82 GB/s

1.14%

-8.2%

bidirectional/1048576

asio (coroutines)

8.59 GB/s

2.88%

+0.9%

bidirectional/1048576

asio (callbacks)

8.52 GB/s

2.99%

baseline

bidirectional/16384

corosio (kqueue)

4.55 GB/s

1.17%

+85.9%

bidirectional/16384

asio (coroutines)

2.41 GB/s

0.62%

-1.5%

bidirectional/16384

asio (callbacks)

2.45 GB/s

0.30%

baseline

bidirectional/262144

corosio (kqueue)

8.93 GB/s

1.75%

-3.4%

bidirectional/262144

asio (coroutines)

7.40 GB/s

10.34%

-20.0%

bidirectional/262144

asio (callbacks)

9.24 GB/s

0.79%

baseline

bidirectional/4096

corosio (kqueue)

1.85 GB/s

0.56%

+131.9%

bidirectional/4096

asio (coroutines)

775.8 MB/s

0.61%

-2.6%

bidirectional/4096

asio (callbacks)

796.5 MB/s

0.62%

baseline

bidirectional/65536

corosio (kqueue)

7.65 GB/s

1.51%

+33.3%

bidirectional/65536

asio (coroutines)

5.71 GB/s

0.91%

-0.5%

bidirectional/65536

asio (callbacks)

5.74 GB/s

1.35%

baseline

bidirectional_lockless/1024

corosio (kqueue)

482.4 MB/s

0.67%

+138.0%

bidirectional_lockless/1024

asio (coroutines)

204.2 MB/s

1.09%

+0.7%

bidirectional_lockless/1024

asio (callbacks)

202.7 MB/s

0.52%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

7.83 GB/s

1.78%

-6.4%

bidirectional_lockless/1048576

asio (coroutines)

8.47 GB/s

2.29%

+1.1%

bidirectional_lockless/1048576

asio (callbacks)

8.37 GB/s

2.86%

baseline

bidirectional_lockless/16384

corosio (kqueue)

4.64 GB/s

0.47%

+87.9%

bidirectional_lockless/16384

asio (coroutines)

2.43 GB/s

0.52%

-1.8%

bidirectional_lockless/16384

asio (callbacks)

2.47 GB/s

0.37%

baseline

bidirectional_lockless/262144

corosio (kqueue)

9.00 GB/s

3.00%

-2.2%

bidirectional_lockless/262144

asio (coroutines)

7.42 GB/s

5.75%

-19.4%

bidirectional_lockless/262144

asio (callbacks)

9.20 GB/s

1.09%

baseline

bidirectional_lockless/4096

corosio (kqueue)

1.85 GB/s

0.53%

+127.6%

bidirectional_lockless/4096

asio (coroutines)

786.2 MB/s

1.20%

-3.2%

bidirectional_lockless/4096

asio (callbacks)

812.0 MB/s

1.13%

baseline

bidirectional_lockless/65536

corosio (kqueue)

7.63 GB/s

1.22%

+33.9%

bidirectional_lockless/65536

asio (coroutines)

5.68 GB/s

1.46%

-0.4%

bidirectional_lockless/65536

asio (callbacks)

5.70 GB/s

1.50%

baseline

socket_throughput — macOS, part 2 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -20% -10% +10% 0% multithread/2 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. +1% multithread/2 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. +1% multithread/2 multithread/4 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. -5% multithread/4 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. +1% multithread/4 multithread/8 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. -15% multithread/8 — 32 bidirectional connection pairs share one context serviced by N threads running the context, with 64 KiB chunks; N is the thread count. -3% multithread/8
Detailed results
Benchmark Implementation Median CV vs asio

multithread/2

corosio (kqueue)

7.70 GB/s

2.01%

+1.2%

multithread/2

asio (coroutines)

7.70 GB/s

1.96%

+1.2%

multithread/2

asio (callbacks)

7.61 GB/s

1.07%

baseline

multithread/4

corosio (kqueue)

3.69 GB/s

3.78%

-5.4%

multithread/4

asio (coroutines)

3.94 GB/s

23.29%

+1.0%

multithread/4

asio (callbacks)

3.90 GB/s

26.88%

baseline

multithread/8

corosio (kqueue)

3.39 GB/s

8.19%

-14.8%

multithread/8

asio (coroutines)

3.84 GB/s

3.57%

-3.5%

multithread/8

asio (callbacks)

3.98 GB/s

2.81%

baseline

socket_throughput — macOS, part 3 ↑ faster · dotted line = asio (callbacks) · backend = kqueue corosio asio (coroutines) -100% +100% +200% +300% 0% unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/1024 unidirectional/1048576 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. -1% unidirectional/1048576 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/1048576 unidirectional/16384 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/16384 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/16384 unidirectional/262144 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/262144 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/262144 unidirectional/4096 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/4096 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/4096 unidirectional/65536 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/65536 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. unidirectional/65536 unidirectional_lockless/1024 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +250% unidirectional_lockless/1024 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +8% unidirectional_lockless/1024 unidirectional_lockless/1048576 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/1048576 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/1048576 unidirectional_lockless/16384 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/16384 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/16384 unidirectional_lockless/262144 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/262144 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -25% unidirectional_lockless/262144 unidirectional_lockless/4096 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/4096 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/4096 unidirectional_lockless/65536 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/65536 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. unidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

unidirectional/1024

corosio (kqueue)

469.9 MB/s

2.19%

+179.7%

unidirectional/1024

asio (coroutines)

161.6 MB/s

0.48%

-3.8%

unidirectional/1024

asio (callbacks)

168.0 MB/s

0.30%

baseline

unidirectional/1048576

corosio (kqueue)

9.06 GB/s

2.68%

-0.9%

unidirectional/1048576

asio (coroutines)

8.96 GB/s

5.24%

-2.0%

unidirectional/1048576

asio (callbacks)

9.15 GB/s

1.28%

baseline

unidirectional/16384

corosio (kqueue)

4.57 GB/s

1.73%

+137.8%

unidirectional/16384

asio (coroutines)

1.91 GB/s

0.55%

-0.7%

unidirectional/16384

asio (callbacks)

1.92 GB/s

1.97%

baseline

unidirectional/262144

corosio (kqueue)

9.18 GB/s

4.42%

+15.3%

unidirectional/262144

asio (coroutines)

6.01 GB/s

14.50%

-24.5%

unidirectional/262144

asio (callbacks)

7.96 GB/s

2.81%

baseline

unidirectional/4096

corosio (kqueue)

1.82 GB/s

2.29%

+182.5%

unidirectional/4096

asio (coroutines)

617.5 MB/s

0.64%

-3.9%

unidirectional/4096

asio (callbacks)

642.6 MB/s

0.29%

baseline

unidirectional/65536

corosio (kqueue)

7.55 GB/s

1.85%

+77.6%

unidirectional/65536

asio (coroutines)

4.21 GB/s

2.27%

-1.0%

unidirectional/65536

asio (callbacks)

4.25 GB/s

2.45%

baseline

unidirectional_lockless/1024

corosio (kqueue)

500.0 MB/s

0.86%

+250.1%

unidirectional_lockless/1024

asio (coroutines)

154.8 MB/s

3.74%

+8.4%

unidirectional_lockless/1024

asio (callbacks)

142.8 MB/s

7.29%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

9.18 GB/s

2.28%

+1.2%

unidirectional_lockless/1048576

asio (coroutines)

8.29 GB/s

6.22%

-8.7%

unidirectional_lockless/1048576

asio (callbacks)

9.07 GB/s

1.53%

baseline

unidirectional_lockless/16384

corosio (kqueue)

4.55 GB/s

2.31%

+136.3%

unidirectional_lockless/16384

asio (coroutines)

1.92 GB/s

0.93%

-0.4%

unidirectional_lockless/16384

asio (callbacks)

1.92 GB/s

1.08%

baseline

unidirectional_lockless/262144

corosio (kqueue)

8.92 GB/s

2.94%

+10.5%

unidirectional_lockless/262144

asio (coroutines)

6.08 GB/s

12.01%

-24.7%

unidirectional_lockless/262144

asio (callbacks)

8.07 GB/s

5.00%

baseline

unidirectional_lockless/4096

corosio (kqueue)

1.87 GB/s

0.69%

+194.3%

unidirectional_lockless/4096

asio (coroutines)

632.7 MB/s

1.00%

-0.5%

unidirectional_lockless/4096

asio (callbacks)

635.9 MB/s

0.74%

baseline

unidirectional_lockless/65536

corosio (kqueue)

7.60 GB/s

1.27%

+81.5%

unidirectional_lockless/65536

asio (coroutines)

4.20 GB/s

1.33%

+0.4%

unidirectional_lockless/65536

asio (callbacks)

4.19 GB/s

3.33%

baseline