Lokyr
Documentation

Latency

On this page

Measured on 2026-10-31 with lokyr --bench latency, on the bundle of commit 57482dd, against the budget of a key to its presented frame: at 120 Hz, p50 ≤ 2 frames and p99 ≤ 3, a frame more next to a pane that floods its output. The raw reports are in latency-F2-54/.

Method

Machine

Results

RateKeysFloodp50p99p50, framesp99, framesBudget, p50 / p99 frames
120 Hzsyntheticno32.2 ms41.1 ms3.864.932 / 3
120 Hzsyntheticyes29.1 ms32.4 ms3.503.893 / 4
120 Hztypedno30.8 ms36.0 ms3.694.322 / 3
120 Hztypedyes29.1 ms34.2 ms3.494.113 / 4
60 Hzsyntheticno41.7 ms49.5 ms2.502.972 / 3
60 Hzsyntheticyes41.7 ms49.4 ms2.502.963 / 4
60 Hztypedno42.4 ms125.2 ms2.547.512 / 3
60 Hztypedyes44.8 ms59.4 ms2.693.563 / 4

Where the latency goes

A build that marked the commit of the frame that shows the key, outside the measures, of synthetic keys:

RateKey → the frame's commitThe commit → the display
60 Hzmedian 10.0 ms, 1.1 to 18.031.8 ms, 31.4 to 32.5: 2 frames
120 Hzmedian 5.7 ms, 1.1 to 16.824.1 ms, 23.0 to 32.3: 3 frames

After the keys' frames came sooner

The Metal layers present without the display's sync, and a key that the bench posts wakes the main run loop, as the keyboard's does. On commit e5ecaaf, synthetic keys, the window on the main display:

RateFloodp50p99p50, framesp99, framesBudget
120 Hzno14.5 ms34.2 ms1.744.102 / 4.5
120 Hzyes14.2 ms32.7 ms1.713.923 / 5.5
60 Hzno21.2 ms41.5 ms1.272.492 / 4.5
60 Hzyes21.5 ms52.0 ms1.293.123 / 5.5

The median of a key to its frame on screen, before and after: at 120 Hz 32.2 ms to 14.5, next to a flood 29.1 to 14.2; at 60 Hz 41.7 to 21.2, next to a flood 41.7 to 21.5; the budgets 16.7, 25.0, 33.3 and 50.0 ms

The 99th percentile of a key to its frame on screen, before and after: at 120 Hz 41.1 ms to 34.2, next to a flood 32.4 to 32.7; at 60 Hz 49.5 to 41.5, next to a flood 49.4 to 52.0; the budgets 37.5, 45.8, 75.0 and 91.7 ms

200 keys at 120 Hz by the frames they took to show: before, 20 in 3 frames, 116 in 4 and 63 in 5; after, 10 in 1 frame, 127 in 2, 55 in 3, 5 in 4 and 2 in 5

The charts come of the raw reports, through python3 tools/bench/report_charts.py latency.