Benchmarks
Every benchmark table, measured on one Linux server: ts-bin-rpc against JSON, Arrow JS, Flechette and Colyseus, streams over HTTP and WebSocket, middleware, queries and sizes.
The full tables behind Performance, which explains what they mean for an app. Speed was measured on a rented Linux server with an Intel Xeon (Icelake): Node 26.13, and headless Chromium 156, Firefox 157 and WebKit 27.2 through Playwright, each run in a fresh process or browser. Every table names its date and the commit it measured.
How to read the speed tables: a group compares variants that do the same work; the ratio is speed
relative to the first variant of the group, JSON unless the group says otherwise, so higher is
better. ~ marks a row whose ratio ranged over 25% between runs. On the site, within each group
green marks the best value of a column, light green the second and red the worst, for times and
bytes alike; a column whose values differ by less than 5% is left plain. Data is synthetic, from
bench/lib/data.mjs, with 30% of names in Cyrillic.
The bench workflow also runs the JSON suite on GitHub Actions for every release and publishes it to bench/results/ci; shared runners move absolute times by tens of percent, so this page uses the server.
Against JSON
Section titled “Against JSON”Generated codecs against JSON.parse over the same bytes decoded with TextDecoder, which is what
response.json() does, and against JSON.stringify for encoding. Source:
server/generated.md.
Hand-written for this type is the ceiling, not a competitor: the same columnar layout written by
hand for User[] alone (bench/lib/codec3.mjs), the prototype the format
was chosen from. It has no column catalog, verification, optional fields or schema evolution, so the
distance to generated is what those cost: up to 25% on reads, close to nothing in WebKit.
2026-11-07, Intel Xeon Processor (Icelake), linux 6.8.0-147-generic, commit 491f807.
Median of 10 runs per runtime, each in a fresh process or browser; ratio is speed relative to the first variant of the group, the median over the runs; ~ marks rows whose ratio ranged over 25% between runs.
- node: node v26.13.0
- chromium: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/156.0.8078.4 Safari/537.36
- firefox: Mozilla/5.0 (X11; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0
- webkit: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.2 Safari/605.1.15
| Group | Variant | node | chromium | firefox | webkit |
|---|---|---|---|---|---|
| 10 users, all fields | JSON | 6.14 µs | 4.59 µs | 6.91 µs | 5.25 µs |
| 10 users, all fields | hand-written for this type | 2.32 µs (2.64x) | 2.37 µs (1.94x) | 4.14 µs (1.67x) | 3.53 µs (1.49x) |
| 10 users, all fields | generated | 2.91 µs (2.11x) | 2.93 µs (1.58x) | 4.67 µs (1.48x) | 3.60 µs (1.46x) |
| 10 users, all fields | generated + verify | 3.55 µs (1.74x) | 3.57 µs (1.29x) | 5.77 µs (1.20x) | 4.27 µs (1.23x) |
| 10 users, all fields | generated, decode (plain) | 2.80 µs (2.20x) | 2.87 µs (1.60x) | 4.74 µs (1.47x) | 3.58 µs (1.46x) |
| 1000 users, all fields | JSON | 573 µs | 635 µs | 613 µs | 607 µs |
| 1000 users, all fields | hand-written for this type | 122 µs (4.70x) | 120 µs (5.30x) | 134 µs (4.56x) | 130 µs (4.62x) |
| 1000 users, all fields | generated | 138 µs (4.17x) | 159 µs (4.00x) | 154 µs (4.00x) | 131 µs (4.58x) |
| 1000 users, all fields | generated + verify | 151 µs (3.80x) | 174 µs (3.65x) | 178 µs (3.45x) | 143 µs (4.12x) |
| 1000 users, all fields | generated, decode (plain) | 106 µs (5.37x) | 121 µs (5.26x) | 156 µs (3.93x) | 130 µs (4.60x) |
| 1000 users, 2 fields | JSON | 567 µs | 633 µs | 610 µs | 590 µs |
| 1000 users, 2 fields | hand-written for this type | 48 µs (11.88x) | 60 µs (10.63x) | 68 µs (8.92x) | 84 µs (7.07x) |
| 1000 users, 2 fields | generated | 56 µs (10.14x) | 67 µs (9.29x) | 72 µs (8.45x) | 83 µs (7.06x) |
| 1000 users, 2 fields | generated + verify | 70 µs (8.10x) | 81 µs (7.76x) | 96 µs (6.34x) | 98 µs (6.09x) |
| 1000 users, 2 fields | generated, decode (plain) | 102 µs (5.57x) | 115 µs (5.49x) | 151 µs (4.02x) | 125 µs (4.73x) |
| 1000 users, numbers only | JSON | 564 µs | 630 µs | 600 µs | 604 µs |
| 1000 users, numbers only | hand-written for this type | 21 µs (27.52x) | 19 µs (32.85x) | 19 µs (31.75x) | 20 µs (31.00x) |
| 1000 users, numbers only | generated | 26 µs (21.41x) | 24 µs (26.13x) | 22 µs (27.78x) | 20 µs (29.90x) |
| 1000 users, numbers only | generated + verify | 47 µs (11.92x) | 57 µs (11.10x) | 53 µs (11.46x) | 74 µs (8.12x) |
| 1000 users, numbers only | generated, decode (plain) | 104 µs (5.48x) | 114 µs (5.51x) | 152 µs (3.94x) | 135 µs (4.48x) |
| 1 user, all fields | JSON | 0.98 µs | 0.95 µs | 1.20 µs | 1.04 µs |
| 1 user, all fields | generated | 0.78 µs (1.26x) | 0.83 µs (1.14x) | 1.34 µs (0.90x) | 1.07 µs (0.96x) |
| 1 user, all fields | generated + verify | 1.04 µs (0.94x) | 1.04 µs (0.91x) | 1.81 µs (0.66x) | 1.38 µs (0.76x) |
| page of 1000 users, all fields | JSON | 574 µs | 637 µs | 601 µs | 592 µs |
| page of 1000 users, all fields | generated | 121 µs (4.73x) | 137 µs (4.66x) | 152 µs (3.95x) | 132 µs (4.51x) |
| page of 1000 users, all fields | generated, decode (plain) | 111 µs (5.22x) | 125 µs (5.10x) | 156 µs (3.84x) | 133 µs (4.45x) |
| 500 products (long text), all fields | JSON | 383 µs | 222 µs | 492 µs | 327 µs |
| 500 products (long text), all fields | generated | 86 µs (4.42x) | 94 µs (2.38x) | 164 µs (3.01x) | 105 µs (3.10x) |
| 500 products (long text), all fields | generated + verify | 108 µs (3.55x) | 115 µs (1.93x) | 196 µs (2.52x) | 129 µs (2.54x) |
| 100k points, every value | JSON, number arrays | 19.2 ms | 17.1 ms | 28.9 ms | 20.2 ms |
| 100k points, every value | generated | 790 µs (24.94x) | 905 µs (18.99x) | 230 µs (125.96x) | 861 µs (23.45x) |
| 100k points, every value | generated + verify | 790 µs (24.30x) | 918 µs (18.74x) | 229 µs (126.07x) | 861 µs (23.40x) |
| encode 1000 users | JSON | 359 µs | 932 µs | 557 µs | 463 µs |
| encode 1000 users | hand-written for this type | 364 µs (0.98x) ~ | 364 µs (2.56x) | 376 µs (1.49x) | 202 µs (2.31x) |
| encode 1000 users | generated | 298 µs (1.19x) ~ | 353 µs (2.65x) | 376 µs (1.48x) | 246 µs (1.90x) |
| encode 500 products | JSON | 184 µs | 593 µs | 370 µs | 508 µs |
| encode 500 products | generated | 255 µs (0.70x) | 576 µs (1.03x) | 347 µs (1.07x) | 470 µs (1.07x) |
| encode 100k points | JSON, number arrays | 19.6 ms | 36.3 ms | 48.6 ms | 30.2 ms |
| encode 100k points | generated | 487 µs (40.28x) ~ | 998 µs (36.42x) | 1.1 ms (43.56x) | 1.1 ms (28.35x) |
Against Arrow JS, Flechette and Colyseus
Section titled “Against Arrow JS, Flechette and Colyseus”Tables and series against Apache Arrow JS and Flechette, game state and its patches against Colyseus schema. Source: libs.md.
2026-11-07, Intel Xeon Processor (Icelake), linux 6.8.0-147-generic, commit 491f807.
Median of 5 runs per runtime, each in a fresh process or browser; ratio is speed relative to the first variant of the group, the median over the runs; ~ marks rows whose ratio ranged over 25% between runs.
- node: node v26.13.0
- chromium: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/156.0.8078.4 Safari/537.36
- firefox: Mozilla/5.0 (X11; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0
- webkit: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.2 Safari/605.1.15
| Group | Variant | node | chromium | firefox | webkit |
|---|---|---|---|---|---|
| 1000 users, encode from rows | JSON | 324 µs | 714 µs | 569 µs | 468 µs |
| 1000 users, encode from rows | ts-bin-rpc | 309 µs (1.04x) | 405 µs (1.74x) | 383 µs (1.51x) | 256 µs (1.89x) |
| 1000 users, encode from rows | Arrow JS | 2.7 ms (0.12x) | 4.0 ms (0.18x) | 2.0 ms (0.29x) | 1.9 ms (0.25x) |
| 1000 users, encode from rows | Flechette | 1.8 ms (0.18x) | 3.9 ms (0.18x) | 981 µs (0.58x) | 1.7 ms (0.30x) |
| 1000 users, decode and read every field | JSON | 578 µs | 474 µs | 607 µs | 638 µs |
| 1000 users, decode and read every field | ts-bin-rpc, views | 118 µs (4.89x) | 150 µs (3.16x) | 157 µs (3.86x) | 189 µs (3.38x) |
| 1000 users, decode and read every field | ts-bin-rpc, views + verify | 129 µs (4.50x) | 165 µs (2.86x) | 179 µs (3.43x) | 205 µs (3.14x) |
| 1000 users, decode and read every field | Arrow JS, columns | 1.1 ms (0.52x) | 1.3 ms (0.36x) | 1.8 ms (0.34x) | 1.4 ms (0.45x) |
| 1000 users, decode and read every field | Flechette, columns | 674 µs (0.86x) | 979 µs (0.48x) | 1.2 ms (0.53x) | 1.0 ms (0.58x) |
| 1000 users, decode and read every field | Flechette, row objects | 913 µs (0.63x) | 1.2 ms (0.39x) | 1.8 ms (0.34x) | 1.2 ms (0.52x) |
| 1000 users, decode and read the numbers | JSON | 586 µs | 455 µs | 599 µs | 592 µs |
| 1000 users, decode and read the numbers | ts-bin-rpc, columns | 15 µs (39.97x) | 11 µs (40.76x) | 21 µs (29.64x) | 18 µs (33.27x) |
| 1000 users, decode and read the numbers | Arrow JS, columns | 41 µs (14.48x) | 34 µs (13.05x) | 52 µs (11.37x) | 48 µs (12.30x) |
| 1000 users, decode and read the numbers | Flechette, columns | 26 µs (22.33x) | 19 µs (23.14x) | 29 µs (20.43x) | 23 µs (25.83x) |
| 100k points, encode | JSON, number arrays | 21.0 ms | 55.4 ms | 114.4 ms | 47.3 ms |
| 100k points, encode | ts-bin-rpc | 858 µs (24.73x) ~ | 1.0 ms (55.03x) | 1.3 ms (86.82x) | 1.1 ms (43.78x) |
| 100k points, encode | Arrow JS | 887 µs (24.58x) ~ | 1.1 ms (49.13x) | 1.5 ms (78.69x) | 1.2 ms (40.24x) |
| 100k points, encode | Flechette | 829 µs (25.62x) | 1.1 ms (51.51x) | 1.1 ms (107.80x) | 1.1 ms (44.04x) |
| 100k points, decode and read every value | JSON, number arrays | 24.8 ms | 24.9 ms | 45.9 ms | 24.7 ms |
| 100k points, decode and read every value | ts-bin-rpc + verify | 362 µs (68.59x) | 372 µs (67.01x) | 261 µs (176.20x) | 739 µs (33.94x) |
| 100k points, decode and read every value | Arrow JS | 644 µs (38.44x) | 646 µs (38.41x) | 321 µs (143.58x) | 804 µs (31.22x) |
| 100k points, decode and read every value | Flechette | 614 µs (40.26x) | 625 µs (39.82x) | 278 µs (166.95x) | 752 µs (32.82x) |
| 100 entities, full state: encode and decode | JSON | 95 µs | 91 µs | 169 µs | 137 µs |
| 100 entities, full state: encode and decode | ts-bin-rpc | 27 µs (3.49x) | 28 µs (3.30x) | 37 µs (4.57x) | 24 µs (5.66x) |
| 100 entities, full state: encode and decode | Colyseus schema | 367 µs (0.26x) | 295 µs (0.31x) | 457 µs (0.37x) | 285 µs (0.48x) |
| 100 entities, 5 move: patch encode, decode and apply | JSON | 4.90 µs | 6.06 µs | 7.06 µs | 4.49 µs |
| 100 entities, 5 move: patch encode, decode and apply | ts-bin-rpc | 3.13 µs (1.56x) | 2.95 µs (2.05x) | 5.67 µs (1.24x) | 2.76 µs (1.62x) |
| 100 entities, 5 move: patch encode, decode and apply | Colyseus schema | 5.99 µs (0.81x) | 4.85 µs (1.22x) | 7.72 µs (0.91x) | 4.26 µs (1.06x) |
| 1000 entities, full state: encode and decode | JSON | 1.0 ms | 1.0 ms | 1.7 ms | 1.2 ms |
| 1000 entities, full state: encode and decode | ts-bin-rpc | 241 µs (4.21x) | 250 µs (4.06x) | 328 µs (5.24x) | 189 µs (6.63x) |
| 1000 entities, full state: encode and decode | Colyseus schema | 3.8 ms (0.26x) | 3.0 ms (0.34x) | 4.7 ms (0.36x) | 2.9 ms (0.43x) |
| 1000 entities, 50 move: patch encode, decode and apply | JSON | 30 µs | 31 µs | 49 µs | 29 µs |
| 1000 entities, 50 move: patch encode, decode and apply | ts-bin-rpc | 7.48 µs (3.97x) | 7.31 µs (4.27x) | 12 µs (4.20x) | 6.51 µs (4.45x) |
| 1000 entities, 50 move: patch encode, decode and apply | Colyseus schema | 52 µs (0.56x) | 43 µs (0.71x) | 73 µs (0.67x) | 39 µs (0.75x) |
Bytes per message
Section titled “Bytes per message”From node bench/node/libs-size.mjs; gzip level 6. Arrow and Flechette send strings as plain Utf8, Colyseus a map of entities by id.
| Message | Format | Bytes | gzip |
|---|---|---|---|
| 1000 users | JSON | 132 KB | 23 KB |
| 1000 users | ts-bin-rpc | 64 KB | 21 KB |
| 1000 users | Arrow JS | 75 KB | 28 KB |
| 1000 users | Flechette | 75 KB | 28 KB |
| 100k points | JSON | 7010 KB | 1722 KB |
| 100k points | ts-bin-rpc | 1953 KB | 1303 KB |
| 100k points | Arrow JS | 1954 KB | 1303 KB |
| 100k points | Flechette | 1954 KB | 1303 KB |
| 100 entities, full state | JSON | 14 KB | 4.9 KB |
| 100 entities, full state | ts-bin-rpc | 3.4 KB | 2.3 KB |
| 100 entities, full state | Colyseus schema | 4.6 KB | 3.3 KB |
| 100 entities, 5 move: patch | JSON | 323 B | 196 B |
| 100 entities, 5 move: patch | ts-bin-rpc | 180 B | 151 B |
| 100 entities, 5 move: patch | Colyseus schema | 75 B | 98 B |
| 1000 entities, full state | JSON | 138 KB | 49 KB |
| 1000 entities, full state | ts-bin-rpc | 34 KB | 22 KB |
| 1000 entities, full state | Colyseus schema | 52 KB | 35 KB |
| 1000 entities, 50 move: patch | JSON | 3.1 KB | 1.3 KB |
| 1000 entities, 50 move: patch | ts-bin-rpc | 824 B | 694 B |
| 1000 entities, 50 move: patch | Colyseus schema | 750 B | 694 B |
- Arrow JS and Flechette read columns, their fastest way; ts-bin-rpc reads views of rows, the way
an app does, and its numbers through
columnsOf. Flechette's row objects are itstoArray(). - The ts-bin-rpc patches are the frames of live state (
LiveDelta), encoded and decoded by the generated code; the bookkeeping oflive()that finds the changed fields is not in them. Colyseus finds changes in its setters, so its rows include that. - Small patches are where ts-bin-rpc loses on bytes: a message carries a header with the string blocks, a row table, a column catalog and bitmaps, about 110 of the 180 bytes of 5 moves. Since 491f807 the writer leaves out the columns no row has (FORMAT §6); before, the same patch took 232 bytes and 30–45% longer.
Streams over a real transport
Section titled “Streams over a real transport”A Node server streams ticks to a Chromium page over HTTP and over a WebSocket, against NDJSON, SSE and JSON over a WebSocket. Source: server/stream-transport.md.
On the server the row of ts-bin-rpc over a WebSocket with window: 0 spread on 0.6.0: page main
thread from 118 to 268 ms at 1 000 ticks/s over four runs, against 111–119 ms on 0.5.1. On an Apple
M3, 18 runs of each version in turn gave 54–74 ms for both, so the spread is put down to that
machine. The row itself is real: at this load it stays slower than JSON over a WebSocket, about 56
against 41 ms on the M3.
2026-11-07, Intel Xeon Processor (Icelake), linux 6.8.0-147-generic, Node v26.13.0, Chromium 156.0.8078.4. Median of 5 runs.
A Node HTTP server on 127.0.0.1 sends ticks { t: f64, price: f32, size: u32, side: 'buy' | 'sell' }; a Chromium page reads every field of every tick. Every transport gets the same producer: on a 1 ms timer it makes every tick that is due (at full speed, bursts of 1000 per macrotask), and NDJSON, SSE and JSON over a WebSocket write once per timer tick, not once per tick (JSON: one text message with an array of the ticks). ts-bin-rpc batches by its window: 16 ms by default, or at the end of each task with window: 0. The WebSocket server is the small one of the tests (e2e/src/ws-server.ts), without compression; the ts-bin-rpc socket stays open between runs.
- Delay: the page's clock minus the send time in the tick; both clocks are of the same machine.
- Page main thread:
TaskDurationof the page's renderer from the Chrome DevTools Protocol, including the decoding and the reading of the ticks. - Server CPU: user and system time of the server process, which also runs the Playwright driver.
- Bytes: what the server wrote to the socket, headers included (for WebSockets, frame headers), without compression.
| Load | Transport | Wall | Delay p50 | Delay p99 | Page main thread | Server CPU | Bytes |
|---|---|---|---|---|---|---|---|
| 1 000 ticks/s for 5 s | ts-bin-rpc, window 16 ms (default) | 5002 ms | 9.09 ms | 16.8 ms | 35.7 ms | 93.2 ms | 105 KB |
| 1 000 ticks/s for 5 s | ts-bin-rpc, window 0 | 5002 ms | 0.08 ms | 0.11 ms | 125 ms | 289 ms | 394 KB |
| 1 000 ticks/s for 5 s | NDJSON over fetch | 5001 ms | 0.08 ms | 0.13 ms | 159 ms | 204 ms | 337 KB |
| 1 000 ticks/s for 5 s | SSE, EventSource | 5001 ms | 0.07 ms | 0.10 ms | 111 ms | 213 ms | 371 KB |
| 1 000 ticks/s for 5 s | ts-bin-rpc over WebSocket, window 16 ms | 5000 ms | 8.91 ms | 17.2 ms | 35.4 ms | 65.4 ms | 107 KB |
| 1 000 ticks/s for 5 s | ts-bin-rpc over WebSocket, window 0 | 5000 ms | 0.07 ms | 0.11 ms | 166 ms | 315 ms | 436 KB |
| 1 000 ticks/s for 5 s | JSON over WebSocket | 5002 ms | 0.06 ms | 0.09 ms | 92.4 ms | 255 ms | 327 KB |
| 20 000 ticks/s for 3 s | ts-bin-rpc, window 16 ms (default) | 3003 ms | 9.25 ms | 16.9 ms | 77.6 ms | 64.5 ms | 1010 KB |
| 20 000 ticks/s for 3 s | ts-bin-rpc, window 0 | 3003 ms | 0.10 ms | 0.15 ms | 130 ms | 214 ms | 1.2 MB |
| 20 000 ticks/s for 3 s | NDJSON over fetch | 3002 ms | 0.11 ms | 0.18 ms | 172 ms | 204 ms | 3.7 MB |
| 20 000 ticks/s for 3 s | SSE, EventSource | 3002 ms | 0.15 ms | 0.94 ms | 441 ms | 791 ms | 4.1 MB |
| 20 000 ticks/s for 3 s | ts-bin-rpc over WebSocket, window 16 ms | 3001 ms | 9.23 ms | 16.9 ms | 73.7 ms | 71.3 ms | 1011 KB |
| 20 000 ticks/s for 3 s | ts-bin-rpc over WebSocket, window 0 | 3001 ms | 0.08 ms | 0.16 ms | 144 ms | 188 ms | 1.2 MB |
| 20 000 ticks/s for 3 s | JSON over WebSocket | 3003 ms | 0.09 ms | 0.13 ms | 134 ms | 184 ms | 3.7 MB |
| 200 000 ticks, as fast as possible | ts-bin-rpc, window 16 ms (default) | 102 ms | 33.2 ms | 62.1 ms | 134 ms | 43.9 ms | 3.3 MB |
| 200 000 ticks, as fast as possible | ts-bin-rpc, window 0 | 100 ms | 34.1 ms | 60.9 ms | 133 ms | 41.2 ms | 3.3 MB |
| 200 000 ticks, as fast as possible | NDJSON over fetch | 202 ms | 67.9 ms | 121 ms | 253 ms | 86.0 ms | 12.2 MB |
| 200 000 ticks, as fast as possible | SSE, EventSource | 1972 ms | 890 ms | 1877 ms | 1161 ms | 2228 ms | 13.6 MB |
| 200 000 ticks, as fast as possible | ts-bin-rpc over WebSocket, window 16 ms | 122 ms | 39.6 ms | 72.0 ms | 148 ms | 58.8 ms | 3.3 MB |
| 200 000 ticks, as fast as possible | ts-bin-rpc over WebSocket, window 0 | 121 ms | 40.3 ms | 76.1 ms | 144 ms | 55.9 ms | 3.3 MB |
| 200 000 ticks, as fast as possible | JSON over WebSocket | 213 ms | 69.1 ms | 132 ms | 197 ms | 110 ms | 12.2 MB |
Middleware
Section titled “Middleware”Source: server/middleware.md.
2026-11-07, Intel Xeon Processor (Icelake), linux 6.8.0-147-generic, Node v26.13.0. Median of 9 rounds of 200,000 sequential awaited calls.
The procedure takes no input and returns nothing, so the handler column is routing, Request and Response without a codec. Context steps return a new object, as { ...ctx, user } does; the around step reads the clock twice.
| Chain | Calling the procedure | Through createHandler |
|---|---|---|
| no middleware | 53 ns | 6.77 µs |
| 1 context step | 102 ns (+49 ns) | 6.84 µs (+64 ns) |
| 1 async context step | 207 ns (+154 ns) | 7.07 µs (+299 ns) |
| 1 around | 327 ns (+274 ns) | 7.25 µs (+475 ns) |
| around + 2 context steps | 407 ns (+353 ns) | 7.42 µs (+646 ns) |
Queries
Section titled “Queries”Source: server/query.md.
2026-11-07, Intel Xeon Processor (Icelake), linux 6.8.0-147-generic, Node v26.13.0. Median of 9 rounds of 50,000 sequential awaited calls.
Client and handler in one process, no network: what a call costs on both sides together. The two procedures take { id: u32 } and return the same 7-field user. The GET call also encodes the input as base64url, builds and parses the URL, and hashes the response for its ETag. The 304 row is the handler alone answering a request whose If-None-Match matches: the procedure still runs, the body is not sent.
| Call | Time | Over POST |
|---|---|---|
| POST, user.get | 20.85 µs | |
| GET, catalog.user | 20.43 µs | −0.42 µs |
| GET, catalog.user, 304 | 10.70 µs | −10.15 µs |
Size after compression
Section titled “Size after compression”Sizes do not depend on the machine. Source: generated-size.md.
2026-11-07. Bytes of ts-bin-rpc, % against JSON compressed the same way. JSON values are those of bench/lib/data.mjs: numbers rounded to 1–3 decimals. The binary series stores float32/float64.
| Payload | raw | gzip-6 | brotli-4 | brotli-6 | brotli-11 | zstd-3 |
|---|---|---|---|---|---|---|
| 1000 users | 65240 (-52%) | 21850 (-8%) | 19731 (-18%) | 17553 (-19%) | 16033 (-11%) | 23010 (-6%) |
| 500 products, long text | 130374 (-18%) | 34740 (0%) | 36879 (-9%) | 32787 (-9%) | 29227 (-4%) | 37164 (-3%) |
| 20 users | 1698 (-37%) | 1011 (+10%) | 1012 (+13%) | 938 (+10%) | 893 (+21%) | 1032 (+10%) |
| 100k points, JSON as number arrays | 2000068 (-51%) | 1334477 (-1%) | 1213570 (+9%) | 1247731 (+12%) | 1037362 (+3%) | 1314874 (+2%) |
| 100k points, JSON as an array of objects | 2000068 (-66%) | 1334477 (-21%) | 1213570 (-24%) | 1247731 (-24%) | 1037362 (-20%) | 1314874 (-27%) |
Bundle size
Section titled “Bundle size”Source: size.md.
esbuild 0.28.2, minified ESM, gzip -9. Generated code: the bundle minus the runtime-only bundle of the same side; for the inputSchema row, what the validator, inputRules and the formats add to the e2e client.
| Schema | Side | Bundle, min | Bundle, min + gz | Generated code, min + gz |
|---|---|---|---|---|
| runtime only | client | 12.7 KB | 5.3 KB | — |
| runtime only | server | 25.5 KB | 10.0 KB | — |
| playground | client | 33.4 KB | 11.2 KB | 5.8 KB |
| playground | server | 48.1 KB | 16.4 KB | 6.4 KB |
| e2e | client | 85.3 KB | 19.7 KB | 14.3 KB |
| e2e | server | 102.5 KB | 24.7 KB | 14.7 KB |
| example dashboard | client | 43.3 KB | 13.3 KB | 7.9 KB |
| example dashboard | server | 55.5 KB | 17.2 KB | 7.2 KB |
| cli fixture "supported" | client | 44.6 KB | 13.3 KB | 8.0 KB |
| cli fixture "supported" | server | 64.2 KB | 20.1 KB | 10.1 KB |
e2e, every input through inputSchema | client | 92.5 KB | 21.7 KB | 2.1 KB |
Running them yourself
Section titled “Running them yourself”pnpm --filter @tbr/bench gen && node bench/run.mjs generated # Node, Chromium, Firefox, WebKitnode bench/gen/libs.mjs && node bench/run.mjs libs # against Arrow, Flechette, Colyseusnode --experimental-strip-types --no-warnings bench/transport.mjsnode --experimental-strip-types --no-warnings bench/middleware.mjsnode --experimental-strip-types --no-warnings bench/query.mjsnode bench/node/generated-size.mjs # sizes; needs the zstd CLInode bench/size.mjs--repeat=n sets the runs per runtime, --runtimes=node,chromium picks runtimes, and --out=dir
writes the results elsewhere. node bench/compare.mjs old.json new.json compares two runs of a
suite.