@@ -2,7 +2,7 @@
22
33 **Machine:** 12th Gen Intel Core i9-12900, ~4.4 GHz
44 **Runtime:** Bun 1.3.9 (x64-linux)
5-**Date:** 2026-04-04
5+**Date:** 2026-04-05 (updated from 2026-04-04 baseline)
66
77 ## Ink Comparison (caveat emptor)
88
@@ -23,11 +23,11 @@ The comparison is included as a rough reference point, not a claim of
2323 superiority. Ink solves a broader set of problems; cel-tui trades
2424 features for raw throughput.
2525
26-| What | cel-tui | Ink 6.8.0 | Ratio |
27-| ------------------------------------------ | ---------- | ------------------------------------------------- | ---------- |
28-| **Single render (comparable tree, 80×24)** | **65 µs** | 632 µs (`renderToString`) | **~10×** |
29-| **1,000 re-renders** | **64 ms** | 632 ms (`renderToString`) / 1,462 ms (`rerender`) | **10–23×** |
30-| **Projected 100k re-renders** | **~6.4 s** | ~63 s (`renderToString`) / ~146 s (`rerender`) | **10–23×** |
26+| What | cel-tui | Ink 6.8.0 | Ratio |
27+| ------------------------------------------ | ---------- | ------------------------------------------------- | --------- |
28+| **Single render (comparable tree, 80×24)** | **65 µs** | 632 µs (`renderToString`) | **~10×** |
29+| **1,000 re-renders** | **67 ms** | 632 ms (`renderToString`) / 1,462 ms (`rerender`) | **9–22×** |
30+| **Projected 100k re-renders** | **~6.7 s** | ~63 s (`renderToString`) / ~146 s (`rerender`) | **9–22×** |
3131
3232 The Ink benchmark script we used is a custom `renderToString` loop (see
3333 [How to Reproduce](#how-to-reproduce)), not Ink's own shipped benchmark,
@@ -51,11 +51,11 @@ numbers are included above.
5151 | Input | Time |
5252 | ---------------------------- | -------- |
5353 | ASCII short (5 chars) | 4.1 ns |
54-| ASCII (64 chars) | 40.3 ns |
55-| ASCII long (640 chars) | 398.6 ns |
56-| CJK + emoji (26 graphemes) | 26.8 ns |
57-| Mixed ASCII + CJK (60 chars) | 5.1 ns |
58-| ANSI escape sequences | 2.9 ns |
54+| ASCII (64 chars) | 39.1 ns |
55+| ASCII long (640 chars) | 386.6 ns |
56+| CJK + emoji (26 graphemes) | 26.6 ns |
57+| Mixed ASCII + CJK (60 chars) | 4.9 ns |
58+| ANSI escape sequences | 3.2 ns |
5959 | Empty string | 0.1 ns |
6060
6161 The fast ASCII path dominates — pure ASCII strings bypass grapheme segmentation entirely.
@@ -65,17 +65,17 @@ The fast ASCII path dominates — pure ASCII strings bypass grapheme segmentatio
6565 | Tree | Time |
6666 | ----------------------------- | -------- |
6767 | 10 children (flat) | 1.5 µs |
68-| 100 children (flat) | 11.9 µs |
69-| 1,000 children (flat) | 124.5 µs |
68+| 100 children (flat) | 12.0 µs |
69+| 1,000 children (flat) | 125.1 µs |
7070 | depth=3 breadth=3 (40 nodes) | 3.0 µs |
71-| depth=4 breadth=3 (121 nodes) | 15.3 µs |
71+| depth=4 breadth=3 (121 nodes) | 15.1 µs |
7272 | depth=3 breadth=5 (156 nodes) | 9.5 µs |
73-| 50 styled groups (200 nodes) | 49.9 µs |
73+| 50 styled groups (200 nodes) | 52.6 µs |
7474 | 10 word-wrap paragraphs | 2.6 µs |
75-| 50 word-wrap paragraphs | 12.3 µs |
76-| Ink-comparable tree | 1.6 µs |
77-| App tree (20 messages) | 9.9 µs |
78-| App tree (100 messages) | 37.9 µs |
75+| 50 word-wrap paragraphs | 13.1 µs |
76+| Ink-comparable tree | 1.7 µs |
77+| App tree (20 messages) | 10.1 µs |
78+| App tree (100 messages) | 39.6 µs |
7979
8080 Layout scales linearly with node count (~120 ns/node for flat trees).
8181
@@ -83,18 +83,18 @@ Layout scales linearly with node count (~120 ns/node for flat trees).
8383
8484 | Scenario | Time |
8585 | ----------------------------- | ------ |
86-| 10 children (flat, 120×40) | 95 µs |
87-| 100 children (flat, 120×40) | 195 µs |
88-| 1,000 children (flat, 120×40) | 198 µs |
89-| Nested 121 nodes (120×40) | 185 µs |
90-| 50 styled groups (120×40) | 220 µs |
91-| 200 lines scrollable (120×40) | 198 µs |
92-| 50 word-wrapped paragraphs | 283 µs |
93-| Ink-comparable (80×24) | 46 µs |
94-| App tree 20 msgs (120×40) | 187 µs |
95-| 80×24 (small terminal) | 110 µs |
96-| 120×40 (medium terminal) | 209 µs |
97-| 200×50 (large terminal) | 312 µs |
86+| 10 children (flat, 120×40) | 93 µs |
87+| 100 children (flat, 120×40) | 193 µs |
88+| 1,000 children (flat, 120×40) | 192 µs |
89+| Nested 121 nodes (120×40) | 180 µs |
90+| 50 styled groups (120×40) | 207 µs |
91+| 200 lines scrollable (120×40) | 185 µs |
92+| 50 word-wrapped paragraphs | 286 µs |
93+| Ink-comparable (80×24) | 45 µs |
94+| App tree 20 msgs (120×40) | 208 µs |
95+| 80×24 (small terminal) | 109 µs |
96+| 120×40 (medium terminal) | 196 µs |
97+| 200×50 (large terminal) | 284 µs |
9898
9999 Paint is O(cells), not O(nodes) — 100 vs 1,000 children produce similar times because only visible cells are painted. Cost scales with terminal size.
100100
@@ -102,14 +102,14 @@ Paint is O(cells), not O(nodes) — 100 vs 1,000 children produce similar times
102102
103103 | Operation | Time |
104104 | ---------------------------- | -------- |
105-| Buffer creation 80×24 | 24.2 µs |
106-| Buffer creation 120×40 | 58.6 µs |
107-| Buffer creation 200×50 | 122.2 µs |
108-| emitBuffer 80×24 (full) | 19.3 µs |
109-| emitBuffer 120×40 (full) | 46.8 µs |
110-| emitDiff 80×24 (no changes) | 11.6 µs |
111-| emitDiff 80×24 (partial) | 11.9 µs |
112-| emitDiff 80×24 (full change) | 10.7 µs |
105+| Buffer creation 80×24 | 24.7 µs |
106+| Buffer creation 120×40 | 58.2 µs |
107+| Buffer creation 200×50 | 117.0 µs |
108+| emitBuffer 80×24 (full) | 21.4 µs |
109+| emitBuffer 120×40 (full) | 46.4 µs |
110+| emitDiff 80×24 (no changes) | 11.8 µs |
111+| emitDiff 80×24 (partial) | 11.1 µs |
112+| emitDiff 80×24 (full change) | 11.2 µs |
113113
114114 Differential rendering has near-constant cost regardless of change amount — dominated by the comparison scan over all cells.
115115
@@ -117,36 +117,36 @@ Differential rendering has near-constant cost regardless of change amount — do
117117
118118 | Operation | Time |
119119 | ---------------------------- | ------- |
120-| hitTest flat 100, center | 135 ns |
121-| hitTest nested 121, center | 35 ns |
122-| hitTest app 50 msgs, center | 102 ns |
123-| hitTest miss (out of bounds) | 1.5 ns |
124-| collectFocusable 100 buttons | 1.15 µs |
125-| collectFocusable app tree | 1.03 µs |
120+| hitTest flat 100, center | 145 ns |
121+| hitTest nested 121, center | 41 ns |
122+| hitTest app 50 msgs, center | 108 ns |
123+| hitTest miss (out of bounds) | 7.7 ns |
124+| collectFocusable 100 buttons | 1.13 µs |
125+| collectFocusable app tree | 0.96 µs |
126126
127127 ### Key Parsing
128128
129129 | Input | Time |
130130 | --------------------- | ------ |
131-| Printable char 'a' | <1 ns |
132-| Ctrl+C (0x03) | <1 ns |
133-| Escape | <1 ns |
134-| Arrow up (CSI) | 2.7 ns |
135-| Shift+Tab (CSI Z) | 7.6 ns |
136-| F5 (CSI 15~) | 163 ns |
137-| Backspace (0x7F) | 6.8 ns |
138-| normalizeKey "ctrl+s" | 90 ns |
131+| Printable char 'a' | 15 ns |
132+| Ctrl+C (0x03) | 18 ns |
133+| Escape | ~1 ns |
134+| Arrow up (CSI) | 58 ns |
135+| Shift+Tab (CSI Z) | <1 ns |
136+| F5 (CSI 15~) | 111 ns |
137+| Backspace (0x7F) | 7.1 ns |
138+| normalizeKey "ctrl+s" | 84 ns |
139139
140140 ### End-to-End Pipeline
141141
142142 | Scenario | Time | Renders/sec |
143143 | ------------------------- | ------ | ----------- |
144-| Ink-comparable (80×24) | 65 µs | **15,400** |
145-| Flat 100 lines (80×24) | 153 µs | 6,500 |
146-| App tree 20 msgs (120×40) | 267 µs | 3,700 |
147-| Re-render no-change diff | 61 µs | 16,400 |
148-| Re-render +1 message diff | 252 µs | 3,970 |
149-| 1,000 re-renders batch | 64 ms | 15,600 |
144+| Ink-comparable (80×24) | 67 µs | **14,900** |
145+| Flat 100 lines (80×24) | 152 µs | 6,600 |
146+| App tree 20 msgs (120×40) | 268 µs | 3,700 |
147+| Re-render no-change diff | 61 µs | 16,300 |
148+| Re-render +1 message diff | 248 µs | 4,030 |
149+| 1,000 re-renders batch | 67 ms | 14,800 |
150150
151151 ## Ink Raw Numbers
152152