macOS Benchmarks

Generated 2026-11-06 from corosio 0b3830d5c30b — 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.

70 faster · 26 within noise · 17 slower of 113 benchmarks — median +62.7% 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 +481.9% local_socket_latency 12 benchmarks faster than asio (callbacks) 12 +96.1% socket_throughput 2 benchmarks slower than asio (callbacks) 8 benchmarks within noise than asio (callbacks) 8 17 benchmarks faster than asio (callbacks) 17 +69.4% socket_latency 2 benchmarks within noise than asio (callbacks) 10 benchmarks faster than asio (callbacks) 10 +65.1% http_server 6 benchmarks slower than asio (callbacks) 6 1 benchmark within noise than asio (callbacks) 4 benchmarks faster than asio (callbacks) 4 -2.5% accept_churn 1 benchmark slower than asio (callbacks) 5 benchmarks within noise than asio (callbacks) 5 3 benchmarks faster than asio (callbacks) 3 -4.1% fan_out 8 benchmarks slower than asio (callbacks) 8 10 benchmarks within noise than asio (callbacks) 10 -7.0%

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

b6d874b77b75085a1b35c640a76d37ab8cd9bb97

Asio commit

e99d9da6d9b76a222e29dcaf3d2df51c788b7527

Asio reactor

kqueue

Capy commit

bdadc6adef8c8eb79da6454373175bb1428be524

Corosio commit

0b3830d5c30b96e4a95c0248953575ba7ffcd4d1

Corosio branch

develop

Date (UTC)

2026-11-05

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. -23% 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. 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. +0% 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. +16% sequential_lockless — Same as sequential, with the context in single-threaded lockless mode. sequential_lockless
Detailed results
Benchmark Implementation Median CV vs asio

burst/10

corosio (kqueue)

4.57K ops/s

5.09%

-4.0%

burst/10

asio (coroutines)

3.17K ops/s

1.30%

-33.4%

burst/10

asio (callbacks)

4.76K ops/s

5.89%

baseline

burst/100

corosio (kqueue)

443.2 ops/s

5.77%

-23.1%

burst/100

asio (coroutines)

353.4 ops/s

2.61%

-38.7%

burst/100

asio (callbacks)

576.7 ops/s

14.07%

baseline

burst_lockless/10

corosio (kqueue)

4.39K ops/s

7.28%

-4.1%

burst_lockless/10

asio (coroutines)

3.21K ops/s

2.47%

-29.9%

burst_lockless/10

asio (callbacks)

4.58K ops/s

8.74%

baseline

burst_lockless/100

corosio (kqueue)

454.1 ops/s

5.71%

-14.8%

burst_lockless/100

asio (coroutines)

340.4 ops/s

4.85%

-36.1%

burst_lockless/100

asio (callbacks)

532.7 ops/s

21.18%

baseline

concurrent/1

corosio (kqueue)

20.69K ops/s

0.72%

+15.5%

concurrent/1

asio (coroutines)

17.69K ops/s

1.06%

-1.2%

concurrent/1

asio (callbacks)

17.91K ops/s

1.00%

baseline

concurrent/16

corosio (kqueue)

35.88K ops/s

4.40%

-13.0%

concurrent/16

asio (coroutines)

41.34K ops/s

2.30%

+0.2%

concurrent/16

asio (callbacks)

41.23K ops/s

7.59%

baseline

concurrent/4

corosio (kqueue)

28.87K ops/s

0.31%

-6.5%

concurrent/4

asio (coroutines)

29.94K ops/s

3.00%

-3.0%

concurrent/4

asio (callbacks)

30.86K ops/s

1.08%

baseline

sequential

corosio (kqueue)

20.84K ops/s

0.68%

+15.1%

sequential

asio (coroutines)

17.93K ops/s

0.81%

-1.0%

sequential

asio (callbacks)

18.11K ops/s

0.62%

baseline

sequential_lockless

corosio (kqueue)

20.69K ops/s

1.01%

+16.2%

sequential_lockless

asio (coroutines)

17.73K ops/s

1.00%

-0.4%

sequential_lockless

asio (callbacks)

17.80K ops/s

0.66%

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) -50% -25% +25% +50% 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. -10% concurrent_parents/1 concurrent_parents/16 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -32% concurrent_parents/16 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -3% concurrent_parents/16 concurrent_parents/4 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -8% concurrent_parents/4 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -5% 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. 0% concurrent_parents_lockless/1 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -10% 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. -6% concurrent_parents_lockless/16 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. +37% 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. -8% concurrent_parents_lockless/4 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -4% concurrent_parents_lockless/4
Detailed results
Benchmark Implementation Median CV vs asio

concurrent_parents/1

corosio (kqueue)

8.07K ops/s

1.20%

+0.3%

concurrent_parents/1

asio (coroutines)

7.27K ops/s

0.41%

-9.7%

concurrent_parents/1

asio (callbacks)

8.04K ops/s

0.60%

baseline

concurrent_parents/16

corosio (kqueue)

6.25K ops/s

19.09%

-31.7%

concurrent_parents/16

asio (coroutines)

8.87K ops/s

16.27%

-2.9%

concurrent_parents/16

asio (callbacks)

9.14K ops/s

20.19%

baseline

concurrent_parents/4

corosio (kqueue)

8.29K ops/s

1.28%

-7.8%

concurrent_parents/4

asio (coroutines)

8.58K ops/s

0.72%

-4.6%

concurrent_parents/4

asio (callbacks)

8.99K ops/s

0.31%

baseline

concurrent_parents_lockless/1

corosio (kqueue)

8.15K ops/s

1.59%

-0.3%

concurrent_parents_lockless/1

asio (coroutines)

7.32K ops/s

0.44%

-10.5%

concurrent_parents_lockless/1

asio (callbacks)

8.18K ops/s

0.53%

baseline

concurrent_parents_lockless/16

corosio (kqueue)

6.06K ops/s

19.10%

-6.4%

concurrent_parents_lockless/16

asio (coroutines)

8.86K ops/s

16.56%

+36.8%

concurrent_parents_lockless/16

asio (callbacks)

6.48K ops/s

20.88%

baseline

concurrent_parents_lockless/4

corosio (kqueue)

8.38K ops/s

1.60%

-7.6%

concurrent_parents_lockless/4

asio (coroutines)

8.68K ops/s

0.65%

-4.4%

concurrent_parents_lockless/4

asio (callbacks)

9.07K ops/s

0.82%

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. 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. +1% 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. -5% 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.70K ops/s

0.65%

-18.2%

fork_join/1

asio (coroutines)

29.41K ops/s

0.77%

-51.6%

fork_join/1

asio (callbacks)

60.76K ops/s

0.89%

baseline

fork_join/16

corosio (kqueue)

8.08K ops/s

1.26%

-0.5%

fork_join/16

asio (coroutines)

7.27K ops/s

0.33%

-10.5%

fork_join/16

asio (callbacks)

8.12K ops/s

0.77%

baseline

fork_join/4

corosio (kqueue)

23.54K ops/s

0.77%

+0.6%

fork_join/4

asio (coroutines)

16.87K ops/s

0.14%

-27.9%

fork_join/4

asio (callbacks)

23.40K ops/s

0.13%

baseline

fork_join/64

corosio (kqueue)

2.08K ops/s

1.67%

-7.7%

fork_join/64

asio (coroutines)

2.15K ops/s

1.35%

-4.8%

fork_join/64

asio (callbacks)

2.26K ops/s

0.28%

baseline

fork_join_lockless/1

corosio (kqueue)

50.35K ops/s

0.21%

-21.7%

fork_join_lockless/1

asio (coroutines)

29.81K ops/s

0.35%

-53.6%

fork_join_lockless/1

asio (callbacks)

64.31K ops/s

0.52%

baseline

fork_join_lockless/16

corosio (kqueue)

8.16K ops/s

1.29%

-0.3%

fork_join_lockless/16

asio (coroutines)

7.31K ops/s

0.34%

-10.7%

fork_join_lockless/16

asio (callbacks)

8.19K ops/s

0.66%

baseline

fork_join_lockless/4

corosio (kqueue)

23.74K ops/s

1.11%

+0.6%

fork_join_lockless/4

asio (coroutines)

16.95K ops/s

0.30%

-28.2%

fork_join_lockless/4

asio (callbacks)

23.59K ops/s

0.31%

baseline

fork_join_lockless/64

corosio (kqueue)

2.10K ops/s

1.68%

-7.9%

fork_join_lockless/64

asio (coroutines)

2.13K ops/s

1.55%

-6.7%

fork_join_lockless/64

asio (callbacks)

2.28K ops/s

0.65%

baseline

nested/16

corosio (kqueue)

2.05K ops/s

1.54%

-8.8%

nested/16

asio (coroutines)

2.03K ops/s

0.64%

-9.6%

nested/16

asio (callbacks)

2.25K ops/s

0.44%

baseline

nested/4

corosio (kqueue)

8.00K ops/s

1.20%

-0.2%

nested/4

asio (coroutines)

6.57K ops/s

0.56%

-18.1%

nested/4

asio (callbacks)

8.02K ops/s

0.65%

baseline

nested_lockless/16

corosio (kqueue)

2.07K ops/s

1.56%

-9.2%

nested_lockless/16

asio (coroutines)

2.05K ops/s

0.75%

-10.1%

nested_lockless/16

asio (callbacks)

2.28K ops/s

0.38%

baseline

nested_lockless/4

corosio (kqueue)

8.06K ops/s

1.13%

-0.7%

nested_lockless/4

asio (coroutines)

6.67K ops/s

0.80%

-17.7%

nested_lockless/4

asio (callbacks)

8.11K ops/s

0.66%

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. 0% 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. 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. -6% single_conn single_conn_lockless — Same as single_conn, with the context in single-threaded lockless mode. -21% 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.69K ops/s

0.35%

-19.6%

concurrent/1

asio (coroutines)

58.60K ops/s

0.76%

-5.1%

concurrent/1

asio (callbacks)

61.77K ops/s

0.88%

baseline

concurrent/16

corosio (kqueue)

130.7K ops/s

1.41%

+2.4%

concurrent/16

asio (coroutines)

127.2K ops/s

0.79%

-0.3%

concurrent/16

asio (callbacks)

127.6K ops/s

0.55%

baseline

concurrent/32

corosio (kqueue)

128.4K ops/s

1.61%

-8.4%

concurrent/32

asio (coroutines)

136.6K ops/s

0.36%

-2.5%

concurrent/32

asio (callbacks)

140.1K ops/s

0.53%

baseline

concurrent/4

corosio (kqueue)

89.93K ops/s

1.03%

-2.5%

concurrent/4

asio (coroutines)

91.33K ops/s

0.24%

-1.0%

concurrent/4

asio (callbacks)

92.27K ops/s

0.13%

baseline

multithread/1

corosio (kqueue)

128.6K ops/s

1.71%

-8.0%

multithread/1

asio (coroutines)

136.5K ops/s

0.30%

-2.4%

multithread/1

asio (callbacks)

139.8K ops/s

0.61%

baseline

multithread/16

corosio (kqueue)

133.2K ops/s

0.70%

+16.3%

multithread/16

asio (coroutines)

114.1K ops/s

1.23%

-0.4%

multithread/16

asio (callbacks)

114.5K ops/s

1.35%

baseline

multithread/2

corosio (kqueue)

184.4K ops/s

0.56%

+8.7%

multithread/2

asio (coroutines)

168.7K ops/s

0.11%

-0.6%

multithread/2

asio (callbacks)

169.7K ops/s

0.26%

baseline

multithread/4

corosio (kqueue)

161.9K ops/s

0.42%

+11.6%

multithread/4

asio (coroutines)

143.5K ops/s

0.25%

-1.1%

multithread/4

asio (callbacks)

145.0K ops/s

0.19%

baseline

multithread/8

corosio (kqueue)

139.3K ops/s

1.25%

+5.2%

multithread/8

asio (coroutines)

130.1K ops/s

0.70%

-1.7%

multithread/8

asio (callbacks)

132.4K ops/s

0.56%

baseline

single_conn

corosio (kqueue)

49.58K ops/s

0.25%

-19.8%

single_conn

asio (coroutines)

58.38K ops/s

1.16%

-5.6%

single_conn

asio (callbacks)

61.83K ops/s

0.97%

baseline

single_conn_lockless

corosio (kqueue)

50.16K ops/s

0.60%

-21.0%

single_conn_lockless

asio (coroutines)

61.07K ops/s

1.24%

-3.8%

single_conn_lockless

asio (callbacks)

63.46K ops/s

1.12%

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. 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. +0% 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. +63% concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. -6% 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. 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. +96% 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.84 µs

0.53%

+96.2%

concurrent/1

asio (coroutines)

48.60 µs

0.18%

+0.0%

concurrent/1

asio (callbacks)

48.62 µs

0.03%

baseline

concurrent/16

corosio (kqueue)

27.39 µs

0.45%

+63.0%

concurrent/16

asio (coroutines)

76.55 µs

0.73%

-3.4%

concurrent/16

asio (callbacks)

74.01 µs

0.51%

baseline

concurrent/4

corosio (kqueue)

6.87 µs

0.33%

+87.6%

concurrent/4

asio (coroutines)

55.47 µs

0.25%

+0.1%

concurrent/4

asio (callbacks)

55.51 µs

0.28%

baseline

concurrent_lockless/1

corosio (kqueue)

1.82 µs

0.30%

+96.2%

concurrent_lockless/1

asio (coroutines)

48.61 µs

0.13%

+0.0%

concurrent_lockless/1

asio (callbacks)

48.62 µs

0.05%

baseline

concurrent_lockless/16

corosio (kqueue)

27.24 µs

0.37%

+62.7%

concurrent_lockless/16

asio (coroutines)

77.21 µs

1.71%

-5.8%

concurrent_lockless/16

asio (callbacks)

72.98 µs

0.37%

baseline

concurrent_lockless/4

corosio (kqueue)

6.83 µs

0.38%

+87.7%

concurrent_lockless/4

asio (coroutines)

55.54 µs

0.29%

-0.3%

concurrent_lockless/4

asio (callbacks)

55.36 µs

0.12%

baseline

pingpong/1

corosio (kqueue)

1.83 µs

0.36%

+96.2%

pingpong/1

asio (coroutines)

48.62 µs

0.07%

+0.0%

pingpong/1

asio (callbacks)

48.63 µs

0.03%

baseline

pingpong/1024

corosio (kqueue)

1.93 µs

0.45%

+96.0%

pingpong/1024

asio (coroutines)

48.63 µs

0.04%

-0.0%

pingpong/1024

asio (callbacks)

48.63 µs

0.12%

baseline

pingpong/64

corosio (kqueue)

1.84 µs

0.25%

+96.2%

pingpong/64

asio (coroutines)

48.62 µs

0.03%

-0.0%

pingpong/64

asio (callbacks)

48.62 µs

0.03%

baseline

pingpong_lockless/1

corosio (kqueue)

1.82 µs

3.18%

+96.3%

pingpong_lockless/1

asio (coroutines)

48.60 µs

0.02%

+0.0%

pingpong_lockless/1

asio (callbacks)

48.62 µs

0.04%

baseline

pingpong_lockless/1024

corosio (kqueue)

1.92 µs

0.45%

+96.1%

pingpong_lockless/1024

asio (coroutines)

48.63 µs

0.08%

+0.0%

pingpong_lockless/1024

asio (callbacks)

48.64 µs

0.23%

baseline

pingpong_lockless/64

corosio (kqueue)

1.82 µs

0.36%

+96.3%

pingpong_lockless/64

asio (coroutines)

48.62 µs

0.04%

-0.0%

pingpong_lockless/64

asio (callbacks)

48.60 µs

0.09%

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) -250% +250% +500% +750% +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. +757% 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. +245% bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -4% 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.30 GB/s

1.90%

+755.3%

bidirectional/1024

asio (coroutines)

151.7 MB/s

0.03%

-0.1%

bidirectional/1024

asio (callbacks)

151.9 MB/s

0.14%

baseline

bidirectional/1048576

corosio (kqueue)

3.90 GB/s

0.57%

+249.9%

bidirectional/1048576

asio (coroutines)

1.11 GB/s

0.03%

-0.8%

bidirectional/1048576

asio (callbacks)

1.12 GB/s

0.27%

baseline

bidirectional/16384

corosio (kqueue)

3.91 GB/s

0.51%

+250.8%

bidirectional/16384

asio (coroutines)

1.11 GB/s

0.04%

-0.6%

bidirectional/16384

asio (callbacks)

1.11 GB/s

0.69%

baseline

bidirectional/262144

corosio (kqueue)

3.91 GB/s

0.64%

+250.3%

bidirectional/262144

asio (coroutines)

1.11 GB/s

0.06%

-0.7%

bidirectional/262144

asio (callbacks)

1.12 GB/s

0.71%

baseline

bidirectional/4096

corosio (kqueue)

2.93 GB/s

0.84%

+383.4%

bidirectional/4096

asio (coroutines)

605.5 MB/s

0.05%

-0.2%

bidirectional/4096

asio (callbacks)

606.7 MB/s

0.14%

baseline

bidirectional/65536

corosio (kqueue)

3.91 GB/s

0.36%

+250.3%

bidirectional/65536

asio (coroutines)

1.11 GB/s

0.02%

-0.8%

bidirectional/65536

asio (callbacks)

1.12 GB/s

0.52%

baseline

bidirectional_lockless/1024

corosio (kqueue)

1.30 GB/s

0.37%

+757.0%

bidirectional_lockless/1024

asio (coroutines)

151.8 MB/s

0.08%

-0.1%

bidirectional_lockless/1024

asio (callbacks)

151.9 MB/s

0.03%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

3.97 GB/s

0.29%

+247.0%

bidirectional_lockless/1048576

asio (coroutines)

1.11 GB/s

0.10%

-3.2%

bidirectional_lockless/1048576

asio (callbacks)

1.14 GB/s

1.70%

baseline

bidirectional_lockless/16384

corosio (kqueue)

4.00 GB/s

0.58%

+248.3%

bidirectional_lockless/16384

asio (coroutines)

1.11 GB/s

0.26%

-3.4%

bidirectional_lockless/16384

asio (callbacks)

1.15 GB/s

1.42%

baseline

bidirectional_lockless/262144

corosio (kqueue)

3.99 GB/s

0.54%

+245.3%

bidirectional_lockless/262144

asio (coroutines)

1.11 GB/s

0.09%

-4.1%

bidirectional_lockless/262144

asio (callbacks)

1.16 GB/s

2.21%

baseline

bidirectional_lockless/4096

corosio (kqueue)

2.97 GB/s

0.71%

+388.9%

bidirectional_lockless/4096

asio (coroutines)

606.0 MB/s

0.12%

-0.2%

bidirectional_lockless/4096

asio (callbacks)

606.9 MB/s

0.11%

baseline

bidirectional_lockless/65536

corosio (kqueue)

3.99 GB/s

0.52%

+246.0%

bidirectional_lockless/65536

asio (coroutines)

1.11 GB/s

0.07%

-4.0%

bidirectional_lockless/65536

asio (callbacks)

1.15 GB/s

2.14%

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. +1454% unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. -7% unidirectional/1024 unidirectional/1048576 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. 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. +482% 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. 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. 0% unidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

unidirectional/1024

corosio (kqueue)

1.27 GB/s

0.26%

+1453.7%

unidirectional/1024

asio (coroutines)

76.50 MB/s

0.37%

-6.7%

unidirectional/1024

asio (callbacks)

82.02 MB/s

1.50%

baseline

unidirectional/1048576

corosio (kqueue)

3.54 GB/s

0.40%

+482.0%

unidirectional/1048576

asio (coroutines)

608.4 MB/s

0.02%

-0.0%

unidirectional/1048576

asio (callbacks)

608.5 MB/s

0.07%

baseline

unidirectional/16384

corosio (kqueue)

3.54 GB/s

0.24%

+481.8%

unidirectional/16384

asio (coroutines)

608.3 MB/s

0.13%

-0.1%

unidirectional/16384

asio (callbacks)

608.6 MB/s

0.02%

baseline

unidirectional/262144

corosio (kqueue)

3.54 GB/s

0.31%

+481.5%

unidirectional/262144

asio (coroutines)

608.3 MB/s

0.06%

-0.0%

unidirectional/262144

asio (callbacks)

608.5 MB/s

0.04%

baseline

unidirectional/4096

corosio (kqueue)

2.73 GB/s

0.10%

+793.8%

unidirectional/4096

asio (coroutines)

304.5 MB/s

0.02%

-0.3%

unidirectional/4096

asio (callbacks)

305.3 MB/s

0.30%

baseline

unidirectional/65536

corosio (kqueue)

3.54 GB/s

0.21%

+482.5%

unidirectional/65536

asio (coroutines)

608.3 MB/s

0.02%

-0.0%

unidirectional/65536

asio (callbacks)

608.5 MB/s

0.04%

baseline

unidirectional_lockless/1024

corosio (kqueue)

1.28 GB/s

0.64%

+1434.4%

unidirectional_lockless/1024

asio (coroutines)

79.13 MB/s

0.72%

-5.3%

unidirectional_lockless/1024

asio (callbacks)

83.58 MB/s

0.30%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

3.61 GB/s

0.28%

+492.7%

unidirectional_lockless/1048576

asio (coroutines)

608.5 MB/s

0.02%

-0.0%

unidirectional_lockless/1048576

asio (callbacks)

608.7 MB/s

0.03%

baseline

unidirectional_lockless/16384

corosio (kqueue)

3.61 GB/s

0.42%

+493.1%

unidirectional_lockless/16384

asio (coroutines)

608.4 MB/s

0.04%

-0.0%

unidirectional_lockless/16384

asio (callbacks)

608.7 MB/s

0.01%

baseline

unidirectional_lockless/262144

corosio (kqueue)

3.60 GB/s

0.29%

+490.8%

unidirectional_lockless/262144

asio (coroutines)

608.5 MB/s

0.04%

-0.0%

unidirectional_lockless/262144

asio (callbacks)

608.8 MB/s

0.01%

baseline

unidirectional_lockless/4096

corosio (kqueue)

2.77 GB/s

0.32%

+787.4%

unidirectional_lockless/4096

asio (coroutines)

304.7 MB/s

0.04%

-2.2%

unidirectional_lockless/4096

asio (callbacks)

311.6 MB/s

0.46%

baseline

unidirectional_lockless/65536

corosio (kqueue)

3.60 GB/s

0.15%

+492.0%

unidirectional_lockless/65536

asio (coroutines)

608.6 MB/s

0.06%

-0.0%

unidirectional_lockless/65536

asio (callbacks)

608.7 MB/s

0.03%

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. +3% concurrent/16 — N independent 64-byte pingpong pairs run concurrently on one context; N is the number of connection pairs. 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. -9% 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. 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. 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. +71% 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. +4% pingpong_lockless/64
Detailed results
Benchmark Implementation Median CV vs asio

concurrent/1

corosio (kqueue)

18.70 µs

0.14%

+65.0%

concurrent/1

asio (coroutines)

54.59 µs

4.46%

-2.2%

concurrent/1

asio (callbacks)

53.43 µs

7.78%

baseline

concurrent/16

corosio (kqueue)

120.50 µs

0.83%

+2.7%

concurrent/16

asio (coroutines)

127.88 µs

5.58%

-3.3%

concurrent/16

asio (callbacks)

123.83 µs

7.30%

baseline

concurrent/4

corosio (kqueue)

43.02 µs

1.24%

+36.7%

concurrent/4

asio (coroutines)

74.36 µs

10.62%

-9.5%

concurrent/4

asio (callbacks)

67.91 µs

12.82%

baseline

concurrent_lockless/1

corosio (kqueue)

18.71 µs

0.44%

+61.1%

concurrent_lockless/1

asio (coroutines)

50.25 µs

6.17%

-4.6%

concurrent_lockless/1

asio (callbacks)

48.04 µs

11.74%

baseline

concurrent_lockless/16

corosio (kqueue)

119.65 µs

0.91%

+7.2%

concurrent_lockless/16

asio (coroutines)

125.29 µs

6.16%

+2.8%

concurrent_lockless/16

asio (callbacks)

128.92 µs

5.65%

baseline

concurrent_lockless/4

corosio (kqueue)

42.35 µs

0.95%

+41.8%

concurrent_lockless/4

asio (coroutines)

73.02 µs

13.57%

-0.3%

concurrent_lockless/4

asio (callbacks)

72.79 µs

0.27%

baseline

pingpong/1

corosio (kqueue)

15.39 µs

0.92%

+67.2%

pingpong/1

asio (coroutines)

48.16 µs

4.59%

-2.5%

pingpong/1

asio (callbacks)

46.97 µs

3.56%

baseline

pingpong/1024

corosio (kqueue)

19.03 µs

0.13%

+66.4%

pingpong/1024

asio (coroutines)

57.03 µs

8.98%

-0.6%

pingpong/1024

asio (callbacks)

56.69 µs

4.87%

baseline

pingpong/64

corosio (kqueue)

18.70 µs

0.85%

+67.2%

pingpong/64

asio (coroutines)

56.77 µs

3.18%

+0.3%

pingpong/64

asio (callbacks)

56.93 µs

3.98%

baseline

pingpong_lockless/1

corosio (kqueue)

15.35 µs

0.07%

+71.2%

pingpong_lockless/1

asio (coroutines)

53.87 µs

8.90%

-1.0%

pingpong_lockless/1

asio (callbacks)

53.32 µs

3.14%

baseline

pingpong_lockless/1024

corosio (kqueue)

19.05 µs

0.14%

+66.4%

pingpong_lockless/1024

asio (coroutines)

55.78 µs

2.69%

+1.7%

pingpong_lockless/1024

asio (callbacks)

56.75 µs

8.28%

baseline

pingpong_lockless/64

corosio (kqueue)

18.68 µs

0.07%

+65.1%

pingpong_lockless/64

asio (coroutines)

51.41 µs

8.35%

+4.0%

pingpong_lockless/64

asio (callbacks)

53.55 µs

5.13%

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. 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. bidirectional/1048576 — Both ends of the connection write and read simultaneously; N is the chunk size in bytes. +3% 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. 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. +136% 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. -12% 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. bidirectional_lockless/262144 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -19% 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)

478.7 MB/s

0.71%

+133.8%

bidirectional/1024

asio (coroutines)

201.7 MB/s

0.30%

-1.5%

bidirectional/1024

asio (callbacks)

204.7 MB/s

1.10%

baseline

bidirectional/1048576

corosio (kqueue)

7.78 GB/s

1.79%

-10.6%

bidirectional/1048576

asio (coroutines)

8.94 GB/s

3.62%

+2.7%

bidirectional/1048576

asio (callbacks)

8.70 GB/s

3.36%

baseline

bidirectional/16384

corosio (kqueue)

4.61 GB/s

0.65%

+88.8%

bidirectional/16384

asio (coroutines)

2.40 GB/s

0.66%

-1.7%

bidirectional/16384

asio (callbacks)

2.44 GB/s

0.19%

baseline

bidirectional/262144

corosio (kqueue)

8.88 GB/s

1.21%

-2.7%

bidirectional/262144

asio (coroutines)

7.39 GB/s

0.34%

-19.1%

bidirectional/262144

asio (callbacks)

9.13 GB/s

0.98%

baseline

bidirectional/4096

corosio (kqueue)

1.83 GB/s

0.65%

+128.8%

bidirectional/4096

asio (coroutines)

777.7 MB/s

0.65%

-3.0%

bidirectional/4096

asio (callbacks)

801.8 MB/s

0.37%

baseline

bidirectional/65536

corosio (kqueue)

7.57 GB/s

1.16%

+32.5%

bidirectional/65536

asio (coroutines)

5.77 GB/s

0.93%

+0.9%

bidirectional/65536

asio (callbacks)

5.72 GB/s

0.66%

baseline

bidirectional_lockless/1024

corosio (kqueue)

480.7 MB/s

0.89%

+136.3%

bidirectional_lockless/1024

asio (coroutines)

205.2 MB/s

0.42%

+0.9%

bidirectional_lockless/1024

asio (callbacks)

203.5 MB/s

0.61%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

7.75 GB/s

4.50%

-12.3%

bidirectional_lockless/1048576

asio (coroutines)

8.44 GB/s

2.46%

-4.5%

bidirectional_lockless/1048576

asio (callbacks)

8.83 GB/s

3.51%

baseline

bidirectional_lockless/16384

corosio (kqueue)

4.68 GB/s

1.62%

+90.5%

bidirectional_lockless/16384

asio (coroutines)

2.42 GB/s

0.33%

-1.5%

bidirectional_lockless/16384

asio (callbacks)

2.45 GB/s

0.19%

baseline

bidirectional_lockless/262144

corosio (kqueue)

8.87 GB/s

1.68%

-3.6%

bidirectional_lockless/262144

asio (coroutines)

7.42 GB/s

0.47%

-19.3%

bidirectional_lockless/262144

asio (callbacks)

9.20 GB/s

4.18%

baseline

bidirectional_lockless/4096

corosio (kqueue)

1.83 GB/s

0.72%

+125.4%

bidirectional_lockless/4096

asio (coroutines)

788.9 MB/s

0.73%

-3.0%

bidirectional_lockless/4096

asio (callbacks)

813.3 MB/s

0.39%

baseline

bidirectional_lockless/65536

corosio (kqueue)

7.65 GB/s

1.92%

+33.8%

bidirectional_lockless/65536

asio (coroutines)

5.73 GB/s

1.39%

+0.2%

bidirectional_lockless/65536

asio (callbacks)

5.71 GB/s

2.71%

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. +3% 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. +1% 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. +0% 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. -13% 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. +1% multithread/8
Detailed results
Benchmark Implementation Median CV vs asio

multithread/2

corosio (kqueue)

7.85 GB/s

3.58%

+2.9%

multithread/2

asio (coroutines)

7.54 GB/s

1.92%

-1.2%

multithread/2

asio (callbacks)

7.63 GB/s

1.60%

baseline

multithread/4

corosio (kqueue)

3.93 GB/s

18.12%

+1.3%

multithread/4

asio (coroutines)

3.90 GB/s

3.59%

+0.5%

multithread/4

asio (callbacks)

3.88 GB/s

2.54%

baseline

multithread/8

corosio (kqueue)

3.39 GB/s

7.31%

-12.5%

multithread/8

asio (coroutines)

3.92 GB/s

2.29%

+1.2%

multithread/8

asio (callbacks)

3.87 GB/s

1.33%

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. 0% 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. -23% 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. +241% unidirectional_lockless/1024 — Same as unidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. +7% 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)

467.6 MB/s

1.07%

+178.3%

unidirectional/1024

asio (coroutines)

162.1 MB/s

0.46%

-3.5%

unidirectional/1024

asio (callbacks)

168.0 MB/s

0.33%

baseline

unidirectional/1048576

corosio (kqueue)

9.08 GB/s

2.78%

-0.1%

unidirectional/1048576

asio (coroutines)

8.94 GB/s

4.99%

-1.7%

unidirectional/1048576

asio (callbacks)

9.09 GB/s

1.66%

baseline

unidirectional/16384

corosio (kqueue)

4.53 GB/s

2.14%

+136.4%

unidirectional/16384

asio (coroutines)

1.91 GB/s

0.58%

-0.6%

unidirectional/16384

asio (callbacks)

1.92 GB/s

1.44%

baseline

unidirectional/262144

corosio (kqueue)

8.95 GB/s

1.21%

+13.2%

unidirectional/262144

asio (coroutines)

6.06 GB/s

0.84%

-23.5%

unidirectional/262144

asio (callbacks)

7.91 GB/s

3.36%

baseline

unidirectional/4096

corosio (kqueue)

1.77 GB/s

1.98%

+177.0%

unidirectional/4096

asio (coroutines)

620.6 MB/s

0.38%

-3.0%

unidirectional/4096

asio (callbacks)

639.8 MB/s

0.32%

baseline

unidirectional/65536

corosio (kqueue)

7.36 GB/s

1.01%

+69.4%

unidirectional/65536

asio (coroutines)

4.15 GB/s

2.89%

-4.5%

unidirectional/65536

asio (callbacks)

4.35 GB/s

3.16%

baseline

unidirectional_lockless/1024

corosio (kqueue)

488.0 MB/s

0.88%

+241.0%

unidirectional_lockless/1024

asio (coroutines)

153.7 MB/s

1.33%

+7.4%

unidirectional_lockless/1024

asio (callbacks)

143.1 MB/s

0.70%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

9.11 GB/s

3.43%

+0.7%

unidirectional_lockless/1048576

asio (coroutines)

8.48 GB/s

5.18%

-6.2%

unidirectional_lockless/1048576

asio (callbacks)

9.05 GB/s

1.37%

baseline

unidirectional_lockless/16384

corosio (kqueue)

4.60 GB/s

2.04%

+139.5%

unidirectional_lockless/16384

asio (coroutines)

1.91 GB/s

0.87%

-0.6%

unidirectional_lockless/16384

asio (callbacks)

1.92 GB/s

1.02%

baseline

unidirectional_lockless/262144

corosio (kqueue)

8.88 GB/s

1.74%

+12.2%

unidirectional_lockless/262144

asio (coroutines)

6.14 GB/s

12.73%

-22.5%

unidirectional_lockless/262144

asio (callbacks)

7.92 GB/s

13.63%

baseline

unidirectional_lockless/4096

corosio (kqueue)

1.82 GB/s

1.44%

+185.9%

unidirectional_lockless/4096

asio (coroutines)

632.8 MB/s

1.02%

-0.9%

unidirectional_lockless/4096

asio (callbacks)

638.3 MB/s

0.85%

baseline

unidirectional_lockless/65536

corosio (kqueue)

7.47 GB/s

2.16%

+76.8%

unidirectional_lockless/65536

asio (coroutines)

4.15 GB/s

0.94%

-1.7%

unidirectional_lockless/65536

asio (callbacks)

4.22 GB/s

3.63%

baseline