Skip to content

Results and methodology

The Performance page explains the main results. This page keeps the reports behind those claims, plus measurements that cover other workloads.

The M3 Ultra tests were recorded in March 2026 with Knitting 0.1.24, on macOS arm64. Each report names its runtime and gives average, minimum, p75, p99 and maximum elapsed time. The performance charts use the averages.

A count of 100 means 100 calls in flight, and the reported time is for the whole batch. Dividing by 100 gives amortized time per call, useful for comparing throughput. It does not tell you how long an individual call waits.

The empty-call test measures a call and its reply with one worker. The payload comparison repeats that trip with different values. The CPU-heavy test searches for primes up to 10,000,000 in chunks of 250,000, with the main thread taking chunks too. Returning the primes adds serialization and parsing work to the computation.

The Markdown reports below are the sources for these charts. The separately saved JSON exports contain different measurements and are not substituted for them. These historical runs have not been repeated on the current release.

Node.js 24.12.0 (arm64-darwin).

node_latency.md
clk: ~3.74 GHz
cpu: Apple M3 Ultra
runtime: node 24.12.0 (arm64-darwin)
| • knitting | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 1.24 µs/iter` | `333.00 ns` | ` 1.63 µs` | ` 2.38 µs` | ` 1.39 ms` |
| 1 thread → (10) | ` 3.07 µs/iter` | ` 2.00 µs` | ` 3.50 µs` | ` 4.03 µs` | ` 4.04 µs` |
| 1 thread → (100) | ` 26.99 µs/iter` | ` 14.46 µs` | ` 34.29 µs` | ` 61.63 µs` | `202.00 µs` |
| 1 thread → (1000) | `284.65 µs/iter` | `162.88 µs` | `376.33 µs` | `521.42 µs` | `618.58 µs` |
| • worker | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 11.01 µs/iter` | ` 10.92 µs` | ` 11.04 µs` | ` 11.18 µs` | ` 11.18 µs` |
| 1 thread → (10) | ` 24.05 µs/iter` | ` 23.32 µs` | ` 24.27 µs` | ` 24.56 µs` | ` 24.80 µs` |
| 1 thread → (100) | `158.03 µs/iter` | `114.67 µs` | `162.08 µs` | `310.79 µs` | ` 3.60 ms` |
| 1 thread → (1000) | ` 1.33 ms/iter` | ` 1.14 ms` | ` 1.38 ms` | ` 3.42 ms` | ` 3.79 ms` |

Deno 2.6.6 (aarch64-apple-darwin).

deno_latency.md
clk: ~3.63 GHz
cpu: Apple M3 Ultra
runtime: deno 2.6.6 (aarch64-apple-darwin)
| • knitting | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 4.99 µs/iter` | `416.00 ns` | ` 4.71 µs` | ` 20.67 µs` | `142.83 µs` |
| 1 thread → (10) | ` 2.92 µs/iter` | ` 2.08 µs` | ` 3.30 µs` | ` 3.85 µs` | ` 3.88 µs` |
| 1 thread → (100) | ` 25.28 µs/iter` | ` 14.00 µs` | ` 32.71 µs` | ` 59.54 µs` | `215.58 µs` |
| 1 thread → (1000) | `274.10 µs/iter` | `153.38 µs` | `363.25 µs` | `501.08 µs` | `701.04 µs` |
| • worker | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 21.57 µs/iter` | ` 13.50 µs` | ` 21.96 µs` | ` 65.63 µs` | `388.63 µs` |
| 1 thread → (10) | ` 80.69 µs/iter` | ` 53.58 µs` | ` 81.50 µs` | `173.04 µs` | ` 1.63 ms` |
| 1 thread → (100) | `656.91 µs/iter` | `544.04 µs` | `697.83 µs` | `863.25 µs` | ` 2.31 ms` |
| 1 thread → (1000) | ` 6.50 ms/iter` | ` 6.05 ms` | ` 6.61 ms` | ` 7.19 ms` | ` 7.30 ms` |

Bun 1.3.6 (arm64-darwin).

bun_latency.md
clk: ~3.65 GHz
cpu: Apple M3 Ultra
runtime: bun 1.3.6 (arm64-darwin)
| • knitting | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 2.49 µs/iter` | `417.00 ns` | ` 2.79 µs` | ` 8.92 µs` | `394.63 µs` |
| 1 thread → (10) | ` 3.59 µs/iter` | ` 2.23 µs` | ` 4.29 µs` | ` 5.07 µs` | ` 5.26 µs` |
| 1 thread → (100) | ` 30.24 µs/iter` | ` 24.25 µs` | ` 32.29 µs` | ` 32.54 µs` | ` 34.28 µs` |
| 1 thread → (1000) | `330.86 µs/iter` | `172.04 µs` | `546.96 µs` | `818.58 µs` | `883.29 µs` |
| • worker | avg | min | p75 | p99 | max |
| ----------------- | ---------------- | ----------- | ----------- | ----------- | ----------- |
| 1 thread → (1) | ` 10.86 µs/iter` | ` 5.79 µs` | ` 11.04 µs` | ` 33.38 µs` | `331.83 µs` |
| 1 thread → (10) | ` 24.71 µs/iter` | ` 23.95 µs` | ` 24.94 µs` | ` 25.18 µs` | ` 25.33 µs` |
| 1 thread → (100) | `190.51 µs/iter` | `118.42 µs` | `205.17 µs` | `678.42 µs` | ` 1.35 ms` |
| 1 thread → (1000) | ` 1.64 ms/iter` | ` 1.33 ms` | ` 1.75 ms` | ` 2.40 ms` | ` 2.71 ms` |

The knit-tex benchmark typesets Pride and Prejudice (2,118 paragraph tasks, 216 pages) with either the main thread or a Knitting pool. The recorded machine has four physical cores and eight logical CPUs; the reports use Node 24.19.0 and Bun 1.4.0 with Knitting 0.1.73. Each warm result is the median of five runs on a reused executor. The source reports include cold runs, CPU time, timer gaps, and output-hash checks:

RuntimeMain-thread warmKnitting x4 warmSpeedupCPU time, main → x4
Node 24.19.0427 ms229 ms1.86×509 → 871 ms
Bun 1.4.0449 ms254 ms1.77×607 → 1,266 ms

Four workers improved warm completion time while using more total CPU time. Cold full-document and fresh-process CLI results were slower with four workers than on the main thread. The benchmark ran on one machine; its saved reports contain medians, not raw samples or confidence intervals. The mixed-batch work-stealing runs use three seeds and show mixed results on Bun. See the Node report, Bun report, and project README for methodology and additional comparisons.

These are newer measurements than the M3 Ultra reports above. With 100 number calls in flight, amortized time per call is 0.81 µs on Node.js, 0.86 µs on Deno, 0.72 µs on Bun. Each figure is the median across runs of the average batch time divided by 100.

Knitting
0.1.70
Machine
Intel Xeon Platinum 8168 @ 2.70GHz, 8 threads
Runtimes
Node.js 24.19.0, Deno 2.7.4, Bun 1.4.0
Measured
12 September 2026, 3 runs
Source
1789245992919, 1789246042357, 1789246092383 at bench commit bcd182e with uncommitted changes

The Payload types page has the full chart and table.

In the Hono report, fifteen idle workers used 0.164 cores. The earlier spin policy used 6.368. Those figures compare two timer policies on the report’s hardware; they are not a general idle-CPU budget.

The IPC reports above compare Knitting with worker messaging, loopback WebSocket and HTTP round trips. Across those runs, Knitting was 4.0–12.1× faster than WebSocket and 10.5–61.9× faster than HTTP. These transports serve different purposes: a worker call does not replace a network connection.

The M3 Ultra payload-growth reports use batches of 64. Taking one payload’s bytes per call and dividing by average batch time gives:

RuntimeString (GB/s)Uint8Array (GB/s)
Node.js1.447.50
Deno3.375.78
Bun11.8616.21

This is a one-direction byte accounting convention, not a standalone memory-copy measurement. The saved reports give the batch times used in the calculation.

The Tokio comparison was recorded separately in March 2026 with Knitting 0.1.36 on an AMD Ryzen 7 4700U running Ubuntu 23.10 x86_64. It includes every binary payload size, the scalar tests and a separate shared-ownership reference. Its raw report records source filenames and methodology, but omits runtime versions.

The M3 Ultra harness lives under bench/ in mimiMonads/knitting. The historical runs used bench/latency.ts for empty calls and bench/withload.ts for primes. Run the driver from the repository root:

Terminal window
./run.sh

Results are written to results/. Use ./run.sh --json to emit JSON. To reproduce historical results, use the measured release and its harness; running the current checkout measures the current implementation.

The Hono report includes the server in Appendix B and harness in Appendix C. The Tokio comparison and newer payload suite live in knitting-vs-tokio-bench. See Payload types for copying committed runs into the docs.