$ rezi

Benchmarks

Rezi includes a benchmark suite comparing terminal UI pipelines across 22 scenarios. The authoritative write-up, methodology, and raw artifacts live in:

Rezi includes a benchmark suite comparing terminal UI pipelines across 22 scenarios. The authoritative write-up, methodology, and raw artifacts live in:

  • BENCHMARKS.md — full scenario definitions, results, and caveats
  • benchmarks/ — committed JSON + Markdown result sets

Frameworks

FrameworkRuntimeNotes
ReziNode.jsFull layout engine, binary drawlist, native C renderer
InkNode.jsReact reconciler + Yoga layout + ANSI string output
OpenTUI (React)BunReact declarative driver on @opentui/core
OpenTUI (Core)BunDirect imperative API, no React overhead
Bubble TeaGo binaryElm architecture, lipgloss string rendering
terminal-kitNode.jsLow-level terminal buffer, no layout system
blessedNode.jsImperative terminal UI, no constraint layout
RatatuiRust binaryNative immediate-mode renderer

Selected results — 2026-02-27, M4 Pro, PTY mode

Single-replicate quick run. Numbers are directional; see BENCHMARKS.md for caveats.

Primitive workloads

rerender — one value changes in a stable tree:

FrameworkMeanops/s
terminal-kit60µs16,400
Ratatui70µs14,300
blessed71µs14,000
Rezi391µs2,600
OpenTUI (Core)1.18ms850
OpenTUI (React)2.72ms368
Bubble Tea8.32ms120
Ink20.03ms50

tree-construction — build a widget tree from scratch:

Framework100 items1000 items
Rezi209µs1.55ms
terminal-kit203µs1.91ms
Ratatui917µs2.37ms
OpenTUI (Core)1.59ms17.60ms
blessed1.82ms19.73ms
Ink24.61ms78.94ms
OpenTUI (React)10.67ms102.49ms

Full-app workloads (PTY output)

terminal-full-ui — composite dashboard, 24 services, 40×120 terminal:

FrameworkMeanops/sPeak RSS
Ratatui267µs3,7002.8 MB
blessed331µs3,000100 MB
Rezi1.24ms80689 MB
OpenTUI (Core)1.31ms765107 MB
OpenTUI (React)3.15ms317162 MB
Bubble Tea8.33ms120~2 MB
Ink22.09ms45170 MB

terminal-strict-ui — structured multi-panel layout (header, 3-column body, footer, status bar):

FrameworkMeanops/s
Ratatui189µs5,300
blessed334µs3,000
Rezi950µs1,100
OpenTUI (Core)1.27ms788
OpenTUI (React)4.60ms217
Bubble Tea8.32ms120
Ink22.41ms45

terminal-virtual-list — 100K items, 40-row viewport, full PTY output:

FrameworkMeanops/s
Ratatui129µs7,700
blessed154µs6,500
Rezi798µs1,300
OpenTUI (Core)1.09ms916
OpenTUI (React)6.75ms148
Bubble Tea8.32ms120
Ink22.56ms44

Memory

Peak RSS at terminal-level workloads:

FrameworkTypical range
Ratatui2–3 MB
Bubble Tea1–30 MB
Rezi83–215 MB
terminal-kit83–142 MB
blessed85–420 MB
OpenTUI (Core)85–243 MB
Ink128–1,250 MB
OpenTUI (React)96–5,440 MB

Running benchmarks

Prerequisites

# Build Rezi
npm ci && npm run build && npm run build:native
npx tsc -b packages/bench

# Bun — required for OpenTUI scenarios
# Install: curl -fsSL https://bun.sh/install | bash

# Go — required for Bubble Tea (built automatically on first run)

# Rust/cargo — required for Ratatui (must be built manually):
cd benchmarks/native/ratatui-bench && cargo build --release && cd -

Quick run — all frameworks, PTY mode

PATH="$HOME/.cargo/bin:$HOME/.bun/bin:$PATH" \
REZI_BUN_BIN="$HOME/.bun/bin/bun" \
node --expose-gc packages/bench/dist/run.js \
  --suite all --io pty --quick \
  --output-dir benchmarks/local-all

Full run (more iterations)

PATH="$HOME/.cargo/bin:$HOME/.bun/bin:$PATH" \
REZI_BUN_BIN="$HOME/.bun/bin/bun" \
node --expose-gc packages/bench/dist/run.js \
  --suite all --io pty \
  --output-dir benchmarks/local-full

Rigorous terminal suite — multi-replicate, shuffled

Suitable for publication-grade comparisons. Requires bare-metal Linux with CPU pinning for minimal jitter:

node --expose-gc packages/bench/dist/run.js \
  --suite terminal --io pty \
  --replicates 7 --discard-first-replicate \
  --shuffle-framework-order --shuffle-seed my-run \
  --cpu-affinity 0-7 --env-check warn \
  --output-dir benchmarks/local-terminal

Targeted runs

# One scenario across all frameworks
node --expose-gc packages/bench/dist/run.js \
  --scenario terminal-full-ui --io pty --quick

# One framework across all scenarios
node --expose-gc packages/bench/dist/run.js \
  --framework rezi-native --io pty --quick

# Rezi vs OpenTUI Core
node --expose-gc packages/bench/dist/run.js \
  --matchup rezi-opentui --opentui-driver core \
  --io pty --quick --output-dir benchmarks/local-matchup

Key flags

FlagDescription
--suite all|terminalAll scenarios, or terminal-only
--framework <name>Single framework
--scenario <name>Single scenario
--io stub|ptyStub (no PTY) or real terminal write
--quickReduced iteration counts for fast checks
--replicates <n>Repeat the full run N times
--output-dir <path>Write results.json + results.md

See BENCHMARKS.md for the full scenario reference, methodology notes, and interpretation guidance.

On this page