Lokyr
Documentation

Performance and memory

On this page

Principles

Budgets

Figures are for Apple Silicon (M-series), release builds. Every release is measured against them before it ships; changing one is an explicit decision, never a silent one. The F0 baseline of existing terminals revised the startup, footprint and idle budgets. Every release's measures stand side by side in the releases' table, with the features that each brought and what they cost.

MetricTargetHow it is measured
Startup, warm, and the first frameThe first window ≤ 70 ms after the first window of ttybench's floor app, an AppKit app that shows one empty window, launched alike in the same round, at the median of a session's rounds, since 25 November 2026, as the startup's gap beside a floor app set it: the gap of the first frame to a minimal app's first window before it, ≤ 35 ms, moved by tens of milliseconds with the Mac's state from a round to the next; the first frame's gap to the floor app's first frame told by each release, of no budget yet; cold, ≤ 1 s at the 90th percentile, after sudo purge, as the startup's measures set itttybench's startup --floor, window_gap_ms, and --first-frame, first_frame_gap_ms, of Instruments' trace; wp_presentation on Linux
Key → presented frame, at 120 Hzp50 ≤ 2 frames, p99 ≤ 4.5, set on 31 October 2026 from the latency's measures, where macOS's composition now and then takes 24 ms from a frame's commit to the display; one extra frame allowed next to a pane flooding output; at 60 Hz, as the releases' sessions run, 33.3 and 75 msttybench's latency, latency_ms: a key to the first frame of its echo that the window server took
Idle0 package idle wakeups/s and ≤ 0.5 interrupt wakeups/s, once the cursor stops blinking (15 s after the last key or output, by default); while it blinks, ≤ 2/s at the default interval, faded or not, and with blinking text, as the window server blinks the cursor's layer and the blinking text's without the app, as the idle's measures showttybench's idle, package_idle_wakeups_per_s and interrupt_wakeups_per_s, the mean of intervals of a second, 20 s after the launch; powermetrics; voluntary_ctxt_switches deltas on Linux
Footprint excluding GPU memory≤ 35 MB with 1 window and 1 pane; ≤ 1 MB per additional pane; ≤ 2 MB per active Luau plugin; back to baseline ±2 MB after closing tabsttybench's memory, footprint_without_gpu_mib, 17 s after the launch: the footprint of the terminal's processes less the GPU categories of footprint, its shell's and ttybench's payload's too, some 3 MB more than Lokyr alone; on Linux PSS and heaptrack, never RSS
Scrollback≤ configured limit + 5%; ≈ 8 B per cellmemory tests in CI
GPU memory (accounted separately)2 BGRA8 framebufferOnly drawables per window (≈ 31 MB each at 3456×2234), three with the build's feature three-drawables, none per pane, of which a window that others cover keeps one, the one that shows its last frame, and a window that its session hides one at most; Metal's own memory while frames are drawn, about 85 to 95 MB on an M5 Pro, whatever the window's size, which the driver keeps and the system can take back about two seconds after the last frame, is any Metal app's, not counted against the budget; the glyph atlas, shared by every window, at most 32 MB: a grayscale texture up to 4096² and a color one up to 2048²The GPU categories of footprint, ttybench's memory's footprint_mib less footprint_without_gpu_mib; Instruments (Metal System Trace); DRM fdinfo on Linux
ThroughputWithin 10 % of the fastest of the other terminals compared, but in vtebench's bottom region, with its lines of one charactervtebench's scenarios and a file of 1 GiB, headless, just bench; on screen, ttybench's throughput, quiet_mib_s, of 1 GiB of plain text, of colored text and of wide characters, and of seq's lines
CPU per frame≤ 2 ms p99 (4K, 4 panes); a frame that draws glyphs that the atlas lacks, ≤ 10 ms, of which it starts looking up faces for 2 ms and draws glyphs for 2 ms at most, the rest left to the frames after, set on 31 October 2026 from the glyphs' measurestracing spans + signposts, and lokyr --bench output, of the main thread's phases; each release tells ttybench's scroll --by lines, frame_cpu_ms, a mean of every thread over a wheel's scroll, which counts more than the phases that the budget bounds
Luau plugin activation≤ 5 ms, compilation includedjust bench-luau: a fresh VM's making, its code's compilation and its activate, of the template that sleip new makes and of a plugin of 2000 lines, in both executions, and its VM's heap

Where Lokyr stands

Lokyr 1.7.0, of 2 December 2026, against its budgets, of its A/B against 1.6.2 and its notarized DMG's startup, and against five other terminals of the comparison of 30 November and 1 December 2026, of 1.6.1's notarized app and each terminal's version of that day, its place of six and the best of the others' figure. The releases' table holds these figures for the last eight releases.

Measure1.7.0BudgetAgainst the other terminals
Startup, its window after the window of ttybench's floor app, launched alike94.7 ms of the release's notarized DMG, 1.6.2's 87.9 in the same session, past the budget for both; 87.6 against 78.3 of bundles in the A/B≤ 70 ms60.6 ms, the first of six; the next 119.4 ms
A key to its echo on screen at 60 Hz, of ttybench, median and 99th percentile12.3 and 29.9 ms, 1.6.2's alike in the same session≤ 33.3 and ≤ 75 ms17.3 and 29.4 ms, the first of six at both; the next 22.1 and 33.5 ms
Memory at rest, without the GPU's31.1 MiB of its processes and the measure's payload, of ttybench≤ 35 MB30.3 MiB of its processes and the measure's payload, the least of six; the next 39.6 MiB
Interrupt wakeups at rest0.33 a second, and no package idle wakeup≤ 0.5 a second0.37 a second, the second of six, 0.02 more than the least; no package idle wakeup, as none of the six
cat of 1 GiB of ASCII on screen304.3 MiB/s, of ttybench, 1.6.2's 310.0 in the same session≥ 284.8 MiB/s320.6 MiB/s, the first of six; the next 316.4 MiB/s
A frame on the CPU, of ttybench, every thread over a wheel's scroll, a frame a step2.44 ms, 1.6.2's 2.39 in the same session—Of ttybench, every thread over a wheel's scroll, a frame a step: 2.54 ms, the least of six; the next 2.66 ms
The GPU while a wheel scrolls, 20 frames a second——19.5 ms a second of its own, the least of six; the next 25.0 ms
Scrolling by pixels, a trackpad's swipe, the frames a second60.7 at 60 Hz, a frame at 99.8 % of the refreshes; 123.3 at 120 Hz and 98.6 %, of 1.4.0's sessions—60.6 of smooth scrolling, as the four others that follow the trackpad at every refresh; 15.9 by rows, of its default, as the one other that scrolls by rows

The figures of one session compare within it alone: a session's load and display move them by a few percent, which is why each release's A/B measures the release before beside it.

How to measure

Every measure of a release, and every comparison with other terminals, is of ttybench, the toolkit that measures terminal emulators on macOS, alike for any terminal. Install it with cargo install ttybench --locked. Lokyr's sessions, the releases' A/B and the comparison, are in tools/bench/sessions, whose README tells how to run them. Each of ttybench's tools launches the terminal running its payload, a small program that prints, reads keys or rests, measures it, and quits it.

macOS asks for two permissions of the app that runs ttybench, such as a terminal or an editor, not of ttybench itself: Accessibility, for the keys, scrolls and drags that it sends, and Screen & System Audio Recording, for its captures of the window. The tools that record Instruments' traces take Xcode, not only its Command Line Tools.

Measurettybench's tool and metricWhat it countsIt takes
Startupstartup --floor, window_gap_msThe launch, through Launch Services, to the terminal's first window on screen, less the window of ttybench's floor app, launched alike in the same round. What slows both alike, such as the Mac's state or a scan of each launch, drops out.—
The first framestartup --floor --first-frame, first_frame_gap_msThe terminal's first frame that the display showed, of its own record in Instruments' Metal System Trace, less the floor app's first frame, which presents one Metal frame as its window shows. A window shows some 10 to 30 ms before its first frame. The trace of every process slows the Mac a little: these figures compare with other sessions of the first frame alone.Xcode
Latencylatency, latency_msA key struck, to the first frame that shows its echo, as the window server took it, of a capture of the window; the keys fall at every phase of the display's refresh; the median and the 99th percentile. --flood measures it beside a pane that yes floods.Accessibility, Screen Recording
Idleidle, package_idle_wakeups_per_s, interrupt_wakeups_per_sThe wakeups of the terminal's processes, of proc_pid_rusage, the mean of intervals of a second, 20 s after the launch. Package idle wakeups bring the CPU out of idle, as top -stats idlew shows; interrupt wakeups count every wakeup of an interrupt, such as a timer's, whether the CPU was idle or not.—
Memorymemory, footprint_without_gpu_mib and footprint_mibThe physical footprint of the terminal's processes, its shell and ttybench's payload too, 17 s after the launch, with and without the GPU's memory that Apple's footprint tells apart: IOSurface, IOAccelerator and the graphics ledger. The GPU's share is the difference of the two.—
Throughputthroughput, quiet_mib_sA file printed on screen, 1 GiB of plain text, of a color before each character or of wide characters, or the lines of seq 1 10000000 (--text numbers), to the quiet: once the terminal's processes stay below 5 % of a core for 60 ms, having drawn what they took.—
A frame on the CPUscroll --by lines, frame_cpu_msThe CPU time of the terminal's processes, of every thread, over a wheel's scroll of plain or of wide text, divided by the frames that showed the text moved: a mean of each round, not a frame's own time.Accessibility, Screen Recording
Scrollingscroll, frames_per_s; frames, refreshes_with_frameThe frames that show the text moved while a trackpad's swipe or a wheel scrolls it, and, of Instruments' trace, the share of the display's refreshes that showed a new frame.Accessibility, Screen Recording; Xcode for frames
The window's motionmotion, frames_per_s, missed_frames, compositor_delay_msThe window dragged by its titlebar or resized by its corner along a sine, of Instruments' Animation Hitches: the frames shown, those missed, and the compositor's delay. The feature blur measures a translucent window.Accessibility, Xcode
The GPUgpu, terminal_gpu_ms_per_sThe GPU time of the terminal's processes and of WindowServer, of IOKit's GPU clients, at rest or while it scrolls; --system adds the system's GPU power, of powermetrics.sudo for --system

Cold: ttybench measures warm launches. A cold one, after sudo purge, was last measured in the startup's measures of 31 October 2026.

In the app, for developers: Lokyr's own lokyr --bench modes are diagnostics, which no release's measure takes.

Inside the code:

On Linux, as Lokyr comes to it:

Benchmarks and CI

LevelToolWhereThreshold
Micro: parser per scenario, cell writes, style dedup, reflow, search over 100k and 1M lines, shaping cachecriterionlocally and on the dedicated Macreport
Instruction counts of vtebench's scenarios and of text as cat prints it, against those of the commit that a push or a pull request starts fromgungraun (callgrind), just instructionsLinux CI (valgrind does not run on Apple Silicon)+3% blocks
End-to-end: startup, the first frame, latency, idle, memory, output, frames on the CPU, scrolling, the window's motionttybench, of the sessions in tools/bench/sessionseach release's A/B on a Mac, against the release before, in sessions of balanced ordersa budget missed, or a cost past the session's spread, is fixed or decided before the release
Memory: opening and closing tabs, full scrollbackintegration testsmacOS and Linux CIthe budgets above
The bundle's and the disk image's sizesthe release's buildeach releasetold in its notes

Every release's results are kept in releases.json and shown side by side in the releases' table, with their charts, so trends are visible and not just jumps.

Techniques and the budgets they serve

TechniqueBudget
8-byte cells, deduplicated styles, pages recycled from a poolMemory, throughput
Fast path for printable ASCII, written straight into the cellsThroughput
Unicode properties in one table lookupThroughput
Grid lock taken per slice and released fairlyLatency under load
Copying only the visible rows that changedCPU per frame
One GPU surface per window, and the cursor's layer, and the blinking text's while it shows; 2 drawables; one kept when occludedGPU memory
Display link running only when there is work; immediate draw after idleIdle, latency
Per-run shaping cache, shared glyph atlasCPU per frame, memory
Luau plugins loaded only when needed; no VM before the first oneStartup, memory
A plugin watchdog that steps in only at the deadline, and runs only while a plugin executesIdle, CPU per frame
No async runtime in the appMemory, startup
System allocator; mimalloc only if measurements justify itMemory

Comparing with other terminals

Every terminal is compared of ttybench's sessions in tools/bench/sessions/compare, of the same tools as the releases' A/B, and of conditions alike:

The comparison of 30 November and 1 December 2026, of 1.6.1 and five other terminals, is the first of ttybench alone, and the README's charts are of it. The comparison of 31 October 2026, the comparison of 13 November 2026 and the comparison of 21 and 22 November 2026, of 1.4.0's code, took these conditions with the tools of their day, before ttybench; their figures compare loosely with ttybench's, whose latency, of every phase of the refresh, lies within a refresh of theirs.