# quasi-bench What a described screen costs to render, in time and in allocations. ``` cargo run --release -p quasi-bench # nanoseconds per render cargo run --release -p quasi-bench --features count # allocations per render ``` Two builds, because the counting allocator is real instrumentation and a timing number taken through it is a number about the instrumentation. Read the allocation count first. It is stable across machines and across whatever else the box is doing; the timing is a sanity check beside it, and on a shared dev box a 10% difference in it is noise. Read down the row-count column rather than across renderers. A cost flat across 5, 25 and 200 rows is fixed and a cost that tracks them is per-row. Comparing the webview's number to the terminal's compares a string builder to a cell painter, and the two columns do not mean the same thing: the webview emits every row, the terminal draws one 160x50 frame and the rest is scroll state. `quasi-immediate` is absent. Its entry point needs a live egui `Ui`, so measuring it means standing up an egui harness rather than calling a function. ## Baseline, fw13 The screen is a copy of MNW's `library_contacts` pane: two tables, five columns and two, linked values in two flavours, a destructive per-row act. Allocations per render (allocs / bytes): | rows | webview fragment | webview screen | terminal | |------|------------------|----------------|----------| | 5 | 205 / 37,890 | 207 / 38,734 | 2,375 / 357,997 | | 25 | 807 / 146,984 | 809 / 147,828 | 3,988 / 506,255 | | 200 | 6,060 / 1,130,426 | 6,062 / 1,131,270 | 12,576 / 1,230,646 | Nanoseconds per render, best of 5 passes of 20,000: | rows | webview fragment | webview screen | terminal | |------|------------------|----------------|----------| | 5 | 6,171 | 6,693 | 299,376 | | 25 | 28,026 | 30,225 | 401,624 | | 200 | 204,136 | 206,474 | 497,650 | Two things worth knowing before reading these as a verdict on anything. The shell is nearly free. A whole screen costs two allocations more than the fragment inside it, at every size, so the head and the stylesheet links are not where a page load goes. The terminal is the expensive column and its cost is mostly not per-row. 2,375 allocations to draw a five-row screen against the webview's 205, rising only to 12,576 at 200 rows where the webview reaches 6,060. Sublinear because the frame clips.