Lokyr
Documentation

What triggers cost

Measured on 1 December 2026. A trigger matches each line of a program's output as it ends. This report measures what that costs the output that a terminal prints fastest, cat of a large file, of the same bundle of no trigger, of one and of ten. The session's report is in triggers-F5b-115, of the scenario triggers.

cat of 1 GiB

Each copy printed 1 GiB of plain text, lines of 79 characters of ASCII, five times in turned orders, on a MacBook Pro of an M5 Pro, the display at 60 Hz. The rate is from the file's first byte to the terminal's quiet.

TriggersMedian95 % interval of the medianAgainst none
None307.0 MiB/s306.5 … 313.8
One306.4 MiB/s304.4 … 314.9−0.6
Ten309.2 MiB/s305.4 … 310.9+2.2 (+0.7 %), −5.4 … +3.9: within the noise

Where the matching goes

The terminal's own work, of cargo bench, on the same Mac:

BenchBeforeAfter
One trigger over 100 000 lines of 79 characters, read from the cells31.4 ms12.0 ms
Ten triggers, alike39.0 ms16.0 ms
The parse of 1 MiB of plain lines, of no trigger328 µs328 µs
The parse of 1 MiB of plain lines, its lines' text kept for the triggers475 µs