macOS Benchmarks

Generated 2026-11-16 from corosio 13bcf933adf8 — 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.

72 faster · 24 within noise · 17 slower of 113 benchmarks — median +63.5% 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.7% local_socket_latency 12 benchmarks faster than asio (callbacks) 12 +96.2% socket_throughput 2 benchmarks slower than asio (callbacks) 7 benchmarks within noise than asio (callbacks) 7 18 benchmarks faster than asio (callbacks) 18 +75.8% socket_latency 1 benchmark within noise than asio (callbacks) 11 benchmarks faster than asio (callbacks) 11 +65.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.6% accept_churn 1 benchmark slower than asio (callbacks) 5 benchmarks within noise than asio (callbacks) 5 3 benchmarks faster than asio (callbacks) 3 -4.0% fan_out 8 benchmarks slower than asio (callbacks) 8 10 benchmarks within noise than asio (callbacks) 10 -4.9%

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

644b3c38a6c52972a1678677951307194ccb04e2

Asio commit

e99d9da6d9b76a222e29dcaf3d2df51c788b7527

Asio reactor

kqueue

Capy commit

25299eb4fd17423b761cc35d47008df7b68976d1

Corosio commit

13bcf933adf8c5ce8576bd3349ae58d2e46e5c53

Corosio branch

develop

Date (UTC)

2026-11-16

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. -16% burst/100 — N connects are fired at once, then all N are accepted before closing; N is the burst size. -36% 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.42K ops/s

6.67%

-3.4%

burst/10

asio (coroutines)

3.19K ops/s

1.37%

-30.4%

burst/10

asio (callbacks)

4.58K ops/s

3.28%

baseline

burst/100

corosio (kqueue)

451.5 ops/s

2.96%

-15.7%

burst/100

asio (coroutines)

342.2 ops/s

4.12%

-36.1%

burst/100

asio (callbacks)

535.9 ops/s

15.90%

baseline

burst_lockless/10

corosio (kqueue)

4.43K ops/s

7.05%

-4.0%

burst_lockless/10

asio (coroutines)

3.16K ops/s

2.18%

-31.5%

burst_lockless/10

asio (callbacks)

4.62K ops/s

5.93%

baseline

burst_lockless/100

corosio (kqueue)

457.3 ops/s

3.35%

-15.3%

burst_lockless/100

asio (coroutines)

347.0 ops/s

5.10%

-35.7%

burst_lockless/100

asio (callbacks)

539.9 ops/s

4.59%

baseline

concurrent/1

corosio (kqueue)

20.72K ops/s

0.66%

+15.6%

concurrent/1

asio (coroutines)

17.73K ops/s

1.47%

-1.1%

concurrent/1

asio (callbacks)

17.92K ops/s

0.42%

baseline

concurrent/16

corosio (kqueue)

36.58K ops/s

5.71%

-14.6%

concurrent/16

asio (coroutines)

42.67K ops/s

14.71%

-0.4%

concurrent/16

asio (callbacks)

42.83K ops/s

5.47%

baseline

concurrent/4

corosio (kqueue)

28.74K ops/s

2.75%

-6.9%

concurrent/4

asio (coroutines)

30.20K ops/s

3.79%

-2.2%

concurrent/4

asio (callbacks)

30.86K ops/s

3.47%

baseline

sequential

corosio (kqueue)

20.82K ops/s

0.63%

+15.5%

sequential

asio (coroutines)

17.77K ops/s

0.69%

-1.4%

sequential

asio (callbacks)

18.03K ops/s

0.99%

baseline

sequential_lockless

corosio (kqueue)

20.80K ops/s

0.77%

+15.7%

sequential_lockless

asio (coroutines)

17.81K ops/s

0.75%

-1.0%

sequential_lockless

asio (callbacks)

17.98K ops/s

0.92%

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% 0% concurrent_parents/1 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. +1% 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. -34% concurrent_parents/16 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -9% concurrent_parents/16 concurrent_parents/4 — N independent parents each fan out to 16 sub-requests at once; N is the number of parents. -6% 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. -35% concurrent_parents_lockless/16 — Same as concurrent_parents, with the context in single-threaded lockless mode; N is the number of parents. -33% 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. -7% 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.14K ops/s

0.89%

+0.6%

concurrent_parents/1

asio (coroutines)

7.25K ops/s

0.42%

-10.4%

concurrent_parents/1

asio (callbacks)

8.09K ops/s

0.72%

baseline

concurrent_parents/16

corosio (kqueue)

6.02K ops/s

20.12%

-34.3%

concurrent_parents/16

asio (coroutines)

8.33K ops/s

19.67%

-9.1%

concurrent_parents/16

asio (callbacks)

9.17K ops/s

19.02%

baseline

concurrent_parents/4

corosio (kqueue)

8.47K ops/s

1.07%

-5.7%

concurrent_parents/4

asio (coroutines)

8.67K ops/s

0.87%

-3.4%

concurrent_parents/4

asio (callbacks)

8.98K ops/s

0.30%

baseline

concurrent_parents_lockless/1

corosio (kqueue)

8.27K ops/s

1.05%

+1.1%

concurrent_parents_lockless/1

asio (coroutines)

7.30K ops/s

0.49%

-10.8%

concurrent_parents_lockless/1

asio (callbacks)

8.18K ops/s

0.62%

baseline

concurrent_parents_lockless/16

corosio (kqueue)

6.08K ops/s

16.49%

-34.6%

concurrent_parents_lockless/16

asio (coroutines)

6.23K ops/s

20.08%

-33.0%

concurrent_parents_lockless/16

asio (callbacks)

9.30K ops/s

19.47%

baseline

concurrent_parents_lockless/4

corosio (kqueue)

8.54K ops/s

1.06%

-6.6%

concurrent_parents_lockless/4

asio (coroutines)

8.79K ops/s

0.94%

-3.9%

concurrent_parents_lockless/4

asio (callbacks)

9.14K ops/s

0.45%

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. 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. -5% 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.35K ops/s

0.80%

-17.9%

fork_join/1

asio (coroutines)

29.20K ops/s

0.50%

-51.4%

fork_join/1

asio (callbacks)

60.11K ops/s

1.55%

baseline

fork_join/16

corosio (kqueue)

8.19K ops/s

1.01%

+1.1%

fork_join/16

asio (coroutines)

7.25K ops/s

0.46%

-10.6%

fork_join/16

asio (callbacks)

8.10K ops/s

0.75%

baseline

fork_join/4

corosio (kqueue)

23.54K ops/s

0.72%

+0.7%

fork_join/4

asio (coroutines)

16.87K ops/s

0.34%

-27.8%

fork_join/4

asio (callbacks)

23.38K ops/s

0.30%

baseline

fork_join/64

corosio (kqueue)

2.15K ops/s

2.36%

-4.8%

fork_join/64

asio (coroutines)

2.15K ops/s

1.15%

-4.9%

fork_join/64

asio (callbacks)

2.26K ops/s

0.33%

baseline

fork_join_lockless/1

corosio (kqueue)

50.20K ops/s

0.24%

-21.6%

fork_join_lockless/1

asio (coroutines)

29.77K ops/s

0.23%

-53.5%

fork_join_lockless/1

asio (callbacks)

64.03K ops/s

1.48%

baseline

fork_join_lockless/16

corosio (kqueue)

8.23K ops/s

1.03%

+0.7%

fork_join_lockless/16

asio (coroutines)

7.31K ops/s

0.47%

-10.6%

fork_join_lockless/16

asio (callbacks)

8.17K ops/s

0.72%

baseline

fork_join_lockless/4

corosio (kqueue)

23.58K ops/s

0.48%

-0.1%

fork_join_lockless/4

asio (coroutines)

16.97K ops/s

0.21%

-28.1%

fork_join_lockless/4

asio (callbacks)

23.60K ops/s

0.31%

baseline

fork_join_lockless/64

corosio (kqueue)

2.17K ops/s

1.72%

-5.1%

fork_join_lockless/64

asio (coroutines)

2.18K ops/s

1.34%

-4.7%

fork_join_lockless/64

asio (callbacks)

2.29K ops/s

0.28%

baseline

nested/16

corosio (kqueue)

2.14K ops/s

1.63%

-5.0%

nested/16

asio (coroutines)

2.04K ops/s

0.43%

-9.3%

nested/16

asio (callbacks)

2.25K ops/s

0.58%

baseline

nested/4

corosio (kqueue)

8.08K ops/s

0.94%

+0.1%

nested/4

asio (coroutines)

6.54K ops/s

0.41%

-18.9%

nested/4

asio (callbacks)

8.07K ops/s

0.94%

baseline

nested_lockless/16

corosio (kqueue)

2.16K ops/s

1.76%

-5.5%

nested_lockless/16

asio (coroutines)

2.08K ops/s

0.91%

-9.2%

nested_lockless/16

asio (callbacks)

2.29K ops/s

0.30%

baseline

nested_lockless/4

corosio (kqueue)

8.15K ops/s

1.09%

-0.4%

nested_lockless/4

asio (coroutines)

6.61K ops/s

0.58%

-19.2%

nested_lockless/4

asio (callbacks)

8.18K ops/s

0.62%

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

0.29%

-19.7%

concurrent/1

asio (coroutines)

58.42K ops/s

0.78%

-5.5%

concurrent/1

asio (callbacks)

61.81K ops/s

1.31%

baseline

concurrent/16

corosio (kqueue)

130.1K ops/s

0.77%

+1.1%

concurrent/16

asio (coroutines)

126.0K ops/s

0.70%

-2.1%

concurrent/16

asio (callbacks)

128.7K ops/s

0.69%

baseline

concurrent/32

corosio (kqueue)

129.4K ops/s

1.17%

-6.9%

concurrent/32

asio (coroutines)

136.6K ops/s

0.44%

-1.8%

concurrent/32

asio (callbacks)

139.1K ops/s

0.47%

baseline

concurrent/4

corosio (kqueue)

90.13K ops/s

0.90%

-2.6%

concurrent/4

asio (coroutines)

91.44K ops/s

0.33%

-1.2%

concurrent/4

asio (callbacks)

92.52K ops/s

0.56%

baseline

multithread/1

corosio (kqueue)

129.3K ops/s

1.19%

-6.8%

multithread/1

asio (coroutines)

136.8K ops/s

0.42%

-1.4%

multithread/1

asio (callbacks)

138.7K ops/s

0.49%

baseline

multithread/16

corosio (kqueue)

132.9K ops/s

0.27%

+14.9%

multithread/16

asio (coroutines)

113.5K ops/s

1.41%

-1.9%

multithread/16

asio (callbacks)

115.7K ops/s

1.20%

baseline

multithread/2

corosio (kqueue)

184.3K ops/s

0.84%

+8.6%

multithread/2

asio (coroutines)

168.1K ops/s

0.22%

-1.0%

multithread/2

asio (callbacks)

169.7K ops/s

0.28%

baseline

multithread/4

corosio (kqueue)

162.1K ops/s

0.37%

+11.9%

multithread/4

asio (coroutines)

143.4K ops/s

0.26%

-1.0%

multithread/4

asio (callbacks)

144.8K ops/s

0.19%

baseline

multithread/8

corosio (kqueue)

138.6K ops/s

1.59%

+5.5%

multithread/8

asio (coroutines)

130.5K ops/s

0.69%

-0.7%

multithread/8

asio (callbacks)

131.4K ops/s

0.56%

baseline

single_conn

corosio (kqueue)

49.53K ops/s

0.27%

-19.9%

single_conn

asio (coroutines)

58.38K ops/s

1.22%

-5.6%

single_conn

asio (callbacks)

61.82K ops/s

0.85%

baseline

single_conn_lockless

corosio (kqueue)

49.98K ops/s

0.18%

-21.5%

single_conn_lockless

asio (coroutines)

62.09K ops/s

1.24%

-2.4%

single_conn_lockless

asio (callbacks)

63.64K ops/s

0.84%

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. -3% 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. +63% 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 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. +0% 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.83 µs

0.51%

+96.2%

concurrent/1

asio (coroutines)

48.63 µs

0.03%

-0.0%

concurrent/1

asio (callbacks)

48.62 µs

0.10%

baseline

concurrent/16

corosio (kqueue)

27.13 µs

0.30%

+63.5%

concurrent/16

asio (coroutines)

76.53 µs

1.02%

-3.1%

concurrent/16

asio (callbacks)

74.25 µs

0.78%

baseline

concurrent/4

corosio (kqueue)

6.82 µs

0.25%

+87.7%

concurrent/4

asio (coroutines)

55.57 µs

0.22%

-0.4%

concurrent/4

asio (callbacks)

55.37 µs

0.42%

baseline

concurrent_lockless/1

corosio (kqueue)

1.81 µs

0.17%

+96.3%

concurrent_lockless/1

asio (coroutines)

48.62 µs

0.11%

-0.0%

concurrent_lockless/1

asio (callbacks)

48.62 µs

0.05%

baseline

concurrent_lockless/16

corosio (kqueue)

26.92 µs

0.57%

+63.2%

concurrent_lockless/16

asio (coroutines)

75.22 µs

0.70%

-2.8%

concurrent_lockless/16

asio (callbacks)

73.16 µs

0.83%

baseline

concurrent_lockless/4

corosio (kqueue)

6.75 µs

0.30%

+87.8%

concurrent_lockless/4

asio (coroutines)

55.37 µs

0.36%

-0.1%

concurrent_lockless/4

asio (callbacks)

55.33 µs

0.26%

baseline

pingpong/1

corosio (kqueue)

1.82 µs

0.34%

+96.3%

pingpong/1

asio (coroutines)

48.63 µs

0.03%

-0.0%

pingpong/1

asio (callbacks)

48.63 µs

0.06%

baseline

pingpong/1024

corosio (kqueue)

1.92 µs

0.28%

+96.1%

pingpong/1024

asio (coroutines)

48.64 µs

0.09%

-0.0%

pingpong/1024

asio (callbacks)

48.62 µs

0.02%

baseline

pingpong/64

corosio (kqueue)

1.82 µs

0.19%

+96.3%

pingpong/64

asio (coroutines)

48.61 µs

0.02%

+0.0%

pingpong/64

asio (callbacks)

48.63 µs

0.04%

baseline

pingpong_lockless/1

corosio (kqueue)

1.80 µs

0.28%

+96.3%

pingpong_lockless/1

asio (coroutines)

48.61 µs

0.07%

-0.0%

pingpong_lockless/1

asio (callbacks)

48.60 µs

0.02%

baseline

pingpong_lockless/1024

corosio (kqueue)

1.90 µs

0.23%

+96.1%

pingpong_lockless/1024

asio (coroutines)

48.62 µs

0.05%

-0.0%

pingpong_lockless/1024

asio (callbacks)

48.62 µs

0.03%

baseline

pingpong_lockless/64

corosio (kqueue)

1.81 µs

0.36%

+96.3%

pingpong_lockless/64

asio (coroutines)

48.60 µs

0.19%

-0.0%

pingpong_lockless/64

asio (callbacks)

48.60 µs

0.04%

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. +762% 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. 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. +236% bidirectional_lockless/65536 — Same as bidirectional, with the context in single-threaded lockless mode; N is the chunk size in bytes. -7% bidirectional_lockless/65536
Detailed results
Benchmark Implementation Median CV vs asio

bidirectional/1024

corosio (kqueue)

1.31 GB/s

0.24%

+760.6%

bidirectional/1024

asio (coroutines)

151.7 MB/s

0.09%

-0.1%

bidirectional/1024

asio (callbacks)

151.9 MB/s

0.02%

baseline

bidirectional/1048576

corosio (kqueue)

3.93 GB/s

0.81%

+251.2%

bidirectional/1048576

asio (coroutines)

1.11 GB/s

0.02%

-1.0%

bidirectional/1048576

asio (callbacks)

1.12 GB/s

0.74%

baseline

bidirectional/16384

corosio (kqueue)

3.92 GB/s

0.52%

+249.7%

bidirectional/16384

asio (coroutines)

1.11 GB/s

0.01%

-1.1%

bidirectional/16384

asio (callbacks)

1.12 GB/s

0.54%

baseline

bidirectional/262144

corosio (kqueue)

3.89 GB/s

0.98%

+246.2%

bidirectional/262144

asio (coroutines)

1.11 GB/s

0.03%

-1.6%

bidirectional/262144

asio (callbacks)

1.12 GB/s

0.79%

baseline

bidirectional/4096

corosio (kqueue)

2.94 GB/s

0.37%

+384.8%

bidirectional/4096

asio (coroutines)

605.4 MB/s

0.14%

-0.2%

bidirectional/4096

asio (callbacks)

606.8 MB/s

0.07%

baseline

bidirectional/65536

corosio (kqueue)

3.90 GB/s

0.62%

+247.5%

bidirectional/65536

asio (coroutines)

1.11 GB/s

0.03%

-1.5%

bidirectional/65536

asio (callbacks)

1.12 GB/s

0.55%

baseline

bidirectional_lockless/1024

corosio (kqueue)

1.31 GB/s

0.24%

+761.8%

bidirectional_lockless/1024

asio (coroutines)

151.8 MB/s

0.03%

-0.1%

bidirectional_lockless/1024

asio (callbacks)

151.9 MB/s

0.02%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

3.99 GB/s

0.47%

+238.1%

bidirectional_lockless/1048576

asio (coroutines)

1.11 GB/s

0.04%

-6.2%

bidirectional_lockless/1048576

asio (callbacks)

1.18 GB/s

1.39%

baseline

bidirectional_lockless/16384

corosio (kqueue)

3.99 GB/s

0.85%

+240.3%

bidirectional_lockless/16384

asio (coroutines)

1.11 GB/s

0.07%

-5.6%

bidirectional_lockless/16384

asio (callbacks)

1.17 GB/s

1.97%

baseline

bidirectional_lockless/262144

corosio (kqueue)

3.99 GB/s

0.54%

+237.5%

bidirectional_lockless/262144

asio (coroutines)

1.11 GB/s

0.01%

-6.3%

bidirectional_lockless/262144

asio (callbacks)

1.18 GB/s

1.36%

baseline

bidirectional_lockless/4096

corosio (kqueue)

2.98 GB/s

0.37%

+390.1%

bidirectional_lockless/4096

asio (coroutines)

606.4 MB/s

0.08%

-0.1%

bidirectional_lockless/4096

asio (callbacks)

607.1 MB/s

0.03%

baseline

bidirectional_lockless/65536

corosio (kqueue)

3.99 GB/s

0.55%

+235.9%

bidirectional_lockless/65536

asio (coroutines)

1.11 GB/s

0.07%

-6.6%

bidirectional_lockless/65536

asio (callbacks)

1.19 GB/s

0.88%

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. +1458% unidirectional/1024 — One writer streams to one reader as fast as possible; N is the write/read chunk size in bytes. -6% 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. 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. +483% 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. 0% 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.28 GB/s

0.35%

+1458.3%

unidirectional/1024

asio (coroutines)

77.25 MB/s

0.29%

-6.1%

unidirectional/1024

asio (callbacks)

82.28 MB/s

1.16%

baseline

unidirectional/1048576

corosio (kqueue)

3.56 GB/s

0.39%

+484.5%

unidirectional/1048576

asio (coroutines)

608.3 MB/s

0.04%

-0.1%

unidirectional/1048576

asio (callbacks)

608.7 MB/s

0.02%

baseline

unidirectional/16384

corosio (kqueue)

3.55 GB/s

0.32%

+483.9%

unidirectional/16384

asio (coroutines)

608.4 MB/s

0.01%

-0.0%

unidirectional/16384

asio (callbacks)

608.7 MB/s

0.03%

baseline

unidirectional/262144

corosio (kqueue)

3.55 GB/s

0.34%

+483.5%

unidirectional/262144

asio (coroutines)

608.3 MB/s

0.07%

-0.1%

unidirectional/262144

asio (callbacks)

608.7 MB/s

0.03%

baseline

unidirectional/4096

corosio (kqueue)

2.74 GB/s

0.34%

+795.8%

unidirectional/4096

asio (coroutines)

304.5 MB/s

0.02%

-0.3%

unidirectional/4096

asio (callbacks)

305.4 MB/s

0.29%

baseline

unidirectional/65536

corosio (kqueue)

3.55 GB/s

0.15%

+483.0%

unidirectional/65536

asio (coroutines)

608.4 MB/s

0.03%

-0.0%

unidirectional/65536

asio (callbacks)

608.6 MB/s

0.02%

baseline

unidirectional_lockless/1024

corosio (kqueue)

1.29 GB/s

0.14%

+1441.7%

unidirectional_lockless/1024

asio (coroutines)

80.55 MB/s

1.05%

-3.7%

unidirectional_lockless/1024

asio (callbacks)

83.67 MB/s

0.48%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

3.62 GB/s

0.48%

+494.5%

unidirectional_lockless/1048576

asio (coroutines)

608.5 MB/s

0.05%

-0.0%

unidirectional_lockless/1048576

asio (callbacks)

608.8 MB/s

0.02%

baseline

unidirectional_lockless/16384

corosio (kqueue)

3.63 GB/s

0.17%

+495.8%

unidirectional_lockless/16384

asio (coroutines)

608.6 MB/s

0.01%

-0.0%

unidirectional_lockless/16384

asio (callbacks)

608.6 MB/s

0.07%

baseline

unidirectional_lockless/262144

corosio (kqueue)

3.61 GB/s

0.35%

+492.5%

unidirectional_lockless/262144

asio (coroutines)

608.5 MB/s

0.06%

-0.0%

unidirectional_lockless/262144

asio (callbacks)

608.7 MB/s

0.02%

baseline

unidirectional_lockless/4096

corosio (kqueue)

2.77 GB/s

0.38%

+785.7%

unidirectional_lockless/4096

asio (coroutines)

304.8 MB/s

0.04%

-2.5%

unidirectional_lockless/4096

asio (callbacks)

312.5 MB/s

0.76%

baseline

unidirectional_lockless/65536

corosio (kqueue)

3.61 GB/s

0.32%

+492.8%

unidirectional_lockless/65536

asio (coroutines)

608.5 MB/s

0.17%

-0.0%

unidirectional_lockless/65536

asio (callbacks)

608.8 MB/s

0.02%

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. 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. +11% concurrent_lockless/16 — Same as concurrent, with the context in single-threaded lockless mode; N is the number of connection pairs. +8% 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. -17% 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. +70% 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.73 µs

0.38%

+65.4%

concurrent/1

asio (coroutines)

56.57 µs

3.37%

-4.6%

concurrent/1

asio (callbacks)

54.07 µs

3.85%

baseline

concurrent/16

corosio (kqueue)

121.35 µs

1.14%

+12.6%

concurrent/16

asio (coroutines)

133.63 µs

6.44%

+3.8%

concurrent/16

asio (callbacks)

138.88 µs

6.20%

baseline

concurrent/4

corosio (kqueue)

42.87 µs

1.07%

+41.0%

concurrent/4

asio (coroutines)

74.75 µs

8.93%

-2.8%

concurrent/4

asio (callbacks)

72.68 µs

10.97%

baseline

concurrent_lockless/1

corosio (kqueue)

18.61 µs

0.23%

+63.6%

concurrent_lockless/1

asio (coroutines)

52.20 µs

3.98%

-2.1%

concurrent_lockless/1

asio (callbacks)

51.15 µs

6.97%

baseline

concurrent_lockless/16

corosio (kqueue)

121.29 µs

1.07%

+10.6%

concurrent_lockless/16

asio (coroutines)

124.52 µs

3.31%

+8.2%

concurrent_lockless/16

asio (callbacks)

135.71 µs

6.58%

baseline

concurrent_lockless/4

corosio (kqueue)

42.30 µs

0.60%

+33.2%

concurrent_lockless/4

asio (coroutines)

73.95 µs

8.70%

-16.7%

concurrent_lockless/4

asio (callbacks)

63.34 µs

15.14%

baseline

pingpong/1

corosio (kqueue)

15.34 µs

0.91%

+68.1%

pingpong/1

asio (coroutines)

48.28 µs

5.69%

-0.4%

pingpong/1

asio (callbacks)

48.07 µs

6.58%

baseline

pingpong/1024

corosio (kqueue)

19.04 µs

0.24%

+66.3%

pingpong/1024

asio (coroutines)

56.80 µs

1.93%

-0.4%

pingpong/1024

asio (callbacks)

56.58 µs

2.01%

baseline

pingpong/64

corosio (kqueue)

18.69 µs

0.50%

+67.0%

pingpong/64

asio (coroutines)

55.32 µs

3.34%

+2.5%

pingpong/64

asio (callbacks)

56.73 µs

7.47%

baseline

pingpong_lockless/1

corosio (kqueue)

15.33 µs

0.28%

+70.0%

pingpong_lockless/1

asio (coroutines)

54.04 µs

4.34%

-5.7%

pingpong_lockless/1

asio (callbacks)

51.11 µs

5.19%

baseline

pingpong_lockless/1024

corosio (kqueue)

19.01 µs

0.27%

+65.3%

pingpong_lockless/1024

asio (coroutines)

55.51 µs

5.79%

-1.4%

pingpong_lockless/1024

asio (callbacks)

54.72 µs

3.52%

baseline

pingpong_lockless/64

corosio (kqueue)

18.62 µs

0.36%

+67.3%

pingpong_lockless/64

asio (coroutines)

56.71 µs

3.17%

+0.5%

pingpong_lockless/64

asio (callbacks)

56.98 µs

4.68%

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. -12% 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. 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. +1% 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. 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. -20% 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)

479.3 MB/s

0.16%

+134.1%

bidirectional/1024

asio (coroutines)

201.6 MB/s

0.71%

-1.5%

bidirectional/1024

asio (callbacks)

204.7 MB/s

1.14%

baseline

bidirectional/1048576

corosio (kqueue)

7.75 GB/s

4.44%

-11.8%

bidirectional/1048576

asio (coroutines)

8.65 GB/s

3.51%

-1.6%

bidirectional/1048576

asio (callbacks)

8.79 GB/s

2.43%

baseline

bidirectional/16384

corosio (kqueue)

4.60 GB/s

0.47%

+88.2%

bidirectional/16384

asio (coroutines)

2.40 GB/s

0.43%

-1.7%

bidirectional/16384

asio (callbacks)

2.44 GB/s

0.21%

baseline

bidirectional/262144

corosio (kqueue)

8.85 GB/s

2.74%

-3.6%

bidirectional/262144

asio (coroutines)

7.43 GB/s

9.95%

-19.0%

bidirectional/262144

asio (callbacks)

9.18 GB/s

0.59%

baseline

bidirectional/4096

corosio (kqueue)

1.83 GB/s

0.35%

+131.0%

bidirectional/4096

asio (coroutines)

770.9 MB/s

0.45%

-2.8%

bidirectional/4096

asio (callbacks)

792.8 MB/s

0.63%

baseline

bidirectional/65536

corosio (kqueue)

7.75 GB/s

1.24%

+35.5%

bidirectional/65536

asio (coroutines)

5.79 GB/s

2.01%

+1.2%

bidirectional/65536

asio (callbacks)

5.72 GB/s

1.30%

baseline

bidirectional_lockless/1024

corosio (kqueue)

480.3 MB/s

0.71%

+135.8%

bidirectional_lockless/1024

asio (coroutines)

203.6 MB/s

0.84%

-0.1%

bidirectional_lockless/1024

asio (callbacks)

203.7 MB/s

1.10%

baseline

bidirectional_lockless/1048576

corosio (kqueue)

7.76 GB/s

2.31%

-9.9%

bidirectional_lockless/1048576

asio (coroutines)

8.51 GB/s

2.95%

-1.2%

bidirectional_lockless/1048576

asio (callbacks)

8.61 GB/s

4.07%

baseline

bidirectional_lockless/16384

corosio (kqueue)

4.64 GB/s

0.65%

+88.3%

bidirectional_lockless/16384

asio (coroutines)

2.42 GB/s

0.38%

-1.8%

bidirectional_lockless/16384

asio (callbacks)

2.46 GB/s

0.43%

baseline

bidirectional_lockless/262144

corosio (kqueue)

8.91 GB/s

3.20%

-3.5%

bidirectional_lockless/262144

asio (coroutines)

7.42 GB/s

8.65%

-19.6%

bidirectional_lockless/262144

asio (callbacks)

9.23 GB/s

1.48%

baseline

bidirectional_lockless/4096

corosio (kqueue)

1.83 GB/s

0.44%

+126.9%

bidirectional_lockless/4096

asio (coroutines)

785.7 MB/s

0.70%

-2.8%

bidirectional_lockless/4096

asio (callbacks)

808.2 MB/s

0.76%

baseline

bidirectional_lockless/65536

corosio (kqueue)

7.64 GB/s

1.44%

+33.1%

bidirectional_lockless/65536

asio (coroutines)

5.71 GB/s

0.95%

-0.6%

bidirectional_lockless/65536

asio (callbacks)

5.74 GB/s

1.26%

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. +2% 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. -7% 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 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. -16% 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. -2% multithread/8
Detailed results
Benchmark Implementation Median CV vs asio

multithread/2

corosio (kqueue)

7.64 GB/s

3.03%

+1.5%

multithread/2

asio (coroutines)

7.71 GB/s

2.65%

+2.4%

multithread/2

asio (callbacks)

7.53 GB/s

0.65%

baseline

multithread/4

corosio (kqueue)

3.82 GB/s

3.79%

-6.6%

multithread/4

asio (coroutines)

3.87 GB/s

3.24%

-5.4%

multithread/4

asio (callbacks)

4.09 GB/s

2.90%

baseline

multithread/8

corosio (kqueue)

3.32 GB/s

7.75%

-15.8%

multithread/8

asio (coroutines)

3.88 GB/s

1.99%

-1.7%

multithread/8

asio (callbacks)

3.94 GB/s

1.99%

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

468.8 MB/s

1.56%

+180.7%

unidirectional/1024

asio (coroutines)

160.5 MB/s

0.31%

-3.9%

unidirectional/1024

asio (callbacks)

167.0 MB/s

4.95%

baseline

unidirectional/1048576

corosio (kqueue)

9.04 GB/s

2.65%

-0.4%

unidirectional/1048576

asio (coroutines)

8.30 GB/s

5.29%

-8.5%

unidirectional/1048576

asio (callbacks)

9.08 GB/s

1.38%

baseline

unidirectional/16384

corosio (kqueue)

4.54 GB/s

2.42%

+136.5%

unidirectional/16384

asio (coroutines)

1.92 GB/s

0.75%

-0.2%

unidirectional/16384

asio (callbacks)

1.92 GB/s

1.12%

baseline

unidirectional/262144

corosio (kqueue)

8.93 GB/s

3.41%

+12.9%

unidirectional/262144

asio (coroutines)

6.07 GB/s

10.94%

-23.3%

unidirectional/262144

asio (callbacks)

7.91 GB/s

2.30%

baseline

unidirectional/4096

corosio (kqueue)

1.78 GB/s

2.25%

+179.1%

unidirectional/4096

asio (coroutines)

612.0 MB/s

0.57%

-3.8%

unidirectional/4096

asio (callbacks)

636.0 MB/s

0.64%

baseline

unidirectional/65536

corosio (kqueue)

7.43 GB/s

1.28%

+75.8%

unidirectional/65536

asio (coroutines)

4.16 GB/s

1.06%

-1.5%

unidirectional/65536

asio (callbacks)

4.23 GB/s

2.68%

baseline

unidirectional_lockless/1024

corosio (kqueue)

489.7 MB/s

0.66%

+243.2%

unidirectional_lockless/1024

asio (coroutines)

157.4 MB/s

0.59%

+10.3%

unidirectional_lockless/1024

asio (callbacks)

142.7 MB/s

0.40%

baseline

unidirectional_lockless/1048576

corosio (kqueue)

9.09 GB/s

3.31%

+1.3%

unidirectional_lockless/1048576

asio (coroutines)

8.96 GB/s

5.69%

-0.1%

unidirectional_lockless/1048576

asio (callbacks)

8.97 GB/s

3.75%

baseline

unidirectional_lockless/16384

corosio (kqueue)

4.60 GB/s

2.39%

+139.3%

unidirectional_lockless/16384

asio (coroutines)

1.91 GB/s

0.95%

-0.4%

unidirectional_lockless/16384

asio (callbacks)

1.92 GB/s

1.53%

baseline

unidirectional_lockless/262144

corosio (kqueue)

8.89 GB/s

1.79%

+11.8%

unidirectional_lockless/262144

asio (coroutines)

6.12 GB/s

13.02%

-23.1%

unidirectional_lockless/262144

asio (callbacks)

7.96 GB/s

2.54%

baseline

unidirectional_lockless/4096

corosio (kqueue)

1.83 GB/s

1.70%

+187.2%

unidirectional_lockless/4096

asio (coroutines)

627.9 MB/s

0.51%

-1.4%

unidirectional_lockless/4096

asio (callbacks)

636.9 MB/s

1.15%

baseline

unidirectional_lockless/65536

corosio (kqueue)

7.62 GB/s

1.38%

+79.4%

unidirectional_lockless/65536

asio (coroutines)

4.36 GB/s

2.43%

+2.8%

unidirectional_lockless/65536

asio (callbacks)

4.25 GB/s

3.10%

baseline