pito-tui, measured

The loop draws at most one frame every 8.333 ms (120 fps), batches every wake that came in since, and draws nothing while nothing changes. Drawing reads the loop's moment, never the clock or the input, so a frame costs only the drawing.

Frame times

The mean and the worst of 1,000 frames for each screen of the demo, at two terminal sizes.

Bars, milliseconds per frame, lower is better, pito-tui 0.4.1. At 120x34 cells: Home 0.094, What to do next 0.136, Log 0.137, Jobs 0.070. At 200x60: Home 0.222, What to do next 0.249, Log 0.314, Jobs 0.249. The budget of one frame at 120 fps: 8.333 ms.
Frame time, mean of 1,000 The whole shell, header, screen and footer, drawn into an in-memory terminal: 0.070 to 0.314 ms, against 8.333 ms a frame at 120 fps.
Bars, milliseconds per frame, lower is better, the worst of 1,000 draws. At 120x34 cells: Home 3.085, What to do next 3.179, Log 0.955, Jobs 0.850. At 200x60: Home 1.991, What to do next 1.907, Log 6.730, Jobs 2.216. The budget of one frame at 120 fps: 8.333 ms.
Worst frame of 1,000 The machine was busy with other work, at load about 58 on 32 threads, which shows in the worst frames; every one still fits the budget.

Every screen of the demo

The mean and worst frame of each screen, at 120x34 and 200x60 cells.

Screen 120x34 average 120x34 worst 200x60 average 200x60 worst
Home 0.094 ms3.085 ms0.222 ms1.991 ms
What to do next 0.136 ms3.179 ms0.249 ms1.907 ms
Log (20,000 lines) 0.137 ms0.955 ms0.314 ms6.730 ms
Jobs 0.070 ms0.850 ms0.249 ms2.216 ms

How it was measured

Once, on 2026-10-14: demo --dump 120x34 --bench 1000 and --dump 200x60 --bench 1000 on the release build of pito-tui 0.4.1 (rustc 1.97.1; 1.0.0 draws with the same code), an AMD Ryzen 9 9950X on Linux. Tui::bench draws each screen 1,000 times into an in-memory terminal, the whole shell each time, moving the clock a frame at a time. Not measured on macOS or Windows.

The same day and machine: the demo's release build is 2.3 MB, 1.7 MB stripped; src/ is 8,768 lines of Rust, tests included; the crate has 11 direct dependencies and 71 in all on Linux; a clean release build of the demo, every dependency included, takes 39 s.

Every number is from pito-tui's README at v1.0.3.

Read it. Run it. It's MIT.

The code is MIT licensed, © Catalin Ilinca: read it, fork it, ship it in your own work. Its name and logos, and PITO MD's, are © Catalin Ilinca, all rights reserved, and are not covered by the MIT licence.