zt-bench

April 9, 2026 · View on GitHub

Benchmark scripts and results for zt, a minimal terminal emulator in Zig.

Benchmarks

bench.sh — compares zt against st, xterm, alacritty, ghostty under Xvfb.

# Requires: hyperfine, Xvfb, terminals installed
./bench.sh

Measures startup time (hyperfine, 30 runs), throughput (4.7MB dense ASCII), and peak RSS. All tests pinned to 1 CPU core. Includes constrained mode (512MB RAM limit) to simulate RPi Zero 2W.

Latest results (Intel i5-12450H, 1 core, X11 :0)

Startup time (30 runs)

TerminalMeanvs zt
zt5.3ms1.0x
xterm23ms4.2x
st43ms8.1x
foot46ms8.6x
alacritty123ms23x
kitty206ms39x
ghostty379ms71x

Throughput: 4.7MB dense ASCII (5 runs)

TerminalTimeMB/sPeak RSS
zt52ms885.7 MB
foot116ms4026 MB
st160ms2925 MB
xterm180ms2613 MB
alacritty222ms21131 MB
kitty306ms15146 MB
ghostty598ms8229 MB

Throughput: 2.9MB TrueColor (5 runs)

TerminalTimeMB/svs zt
zt53ms551.0x
foot107ms272.0x
xterm129ms232.4x
st130ms222.4x
alacritty196ms153.7x
kitty280ms105.3x
ghostty534ms510.1x

Throughput: 3.0MB Unicode/CJK (5 runs)

TerminalTimeMB/svs zt
zt58ms521.0x
foot126ms242.2x
st126ms242.2x
xterm142ms212.5x
alacritty200ms153.4x
kitty292ms105.0x
ghostty480ms68.3x

Idle memory (PSS)

TerminalRSSPSSvs zt
zt5.0 MB2.3 MB1.0x
xterm11 MB4.3 MB1.8x
foot24 MB10 MB4.2x
st25 MB13 MB5.3x
alacritty107 MB33 MB14x
kitty135 MB51 MB22x
ghostty215 MB87 MB38x

Integration tests

ScriptPurpose
test-xvfb.shFull integration test suite under Xvfb
test-xvfb-local.shLocal version (no Docker)
test-apps.shVerify terminal apps (vim, nano, less, btop, etc.)
Dockerfile.testDocker environment for CI

License

MIT

Disclaimer

This project uses AI-generated code (LLM). I do my best to review and test it, but I can't guarantee it's perfect. Please use it at your own risk.\n