
zsh-bench
https://github.com/romkatv/zsh-bench- Category
- Developer Tools
- Rank
- No. 781Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- romkatv
- GitHub
- 1.0k stars
- Date
About
Benchmark for measuring interactive Zsh latency — find out which plugins are making your shell slow.
What it does
It launches a login shell inside a virtual terminal, types controlled input, and times visible responses. Results separate first prompt, first command, repeated command, keyboard input, and exit latency, while also reporting detected shell capabilities.
Why it's ranked here
Its strongest idea is measuring the interactive experience through a terminal instead of treating process startup as a proxy. Predefined configurations, isolated runs, and perception-based thresholds make results easier to compare. The thresholds come from one author’s blind study, so they are useful guides rather than universal limits.
What's good
The output distinguishes delays that users experience differently, including typing responsiveness and prompt redraws. It detects completion, highlighting, autosuggestions, Git prompts, and nested terminal use, helping comparisons retain feature context. Docker and dedicated-user isolation support repeatable configuration testing, while raw output preserves individual measurements.
Tradeoffs
Local benchmarking requires Zsh 5.8 or newer and expects Zsh to be the login shell. Docker isolation adds Docker and tar requirements, while user isolation requires root access. Startup files that launch tmux can hang under an affected tmux version, and history settings may allow benchmark commands into shell history.
How to use it well
Use it when tuning a personal Zsh setup or comparing prompts, frameworks, plugin managers, and initialization strategies. Measure a baseline, change one configuration element, then rerun under consistent isolation. Pair the numbers with the included perception simulator. It does not profile code or identify a slow component automatically.
Technical notes+
The main zsh-bench executable is a Zsh script that requires Zsh 5.8, creates a virtual TTY through the system script utility, records terminal timing, and supports raw or minimum-of-iterations output. It handles util-linux and BSD variants of script, uses Docker or host-user isolation for predefined configurations, and delegates multi-config work to internal/benchmark-many. human-bench injects selected latency values through environment variables and can randomly choose among repeated values for blinded perception tests. zsh-playground installs predefined configurations into Docker or a dedicated host user. dbg/replay and dbg/timeline inspect captured terminal output and timing data. doc/print-table converts benchmark output into normalized comparison tables. internal/install-deps provisions an Ubuntu container and installs Zsh, terminal utilities, Git, tmux dependencies, and Starship.
Observed
- License
- MIT License
- Primary language
- Zsh shell scripts
- Installation
- Clone the Git repository; no package-manager installation is documented
- Interface
- Command-line executables for benchmarking, perception testing, and configuration playgrounds
- Runtime requirement
- Zsh 5.8 or newer
- Isolation
- Supports Docker isolation and dedicated host-user isolation
- Documented environments
- Benchmark data is provided for a Linux desktop, Raspberry Pi, and macOS laptop
- Output
- Reports shell capability flags and latency measurements in milliseconds
Read from README.md, doc/macos-laptop.md, doc/linux-desktop.md, doc/linux-raspberrypi.md, LICENSE, zsh-bench, human-bench, zsh-playground, dbg/replay, dbg/timeline, doc/print-table, doc/macos-laptop.txt, internal/create-repo, doc/linux-desktop.txt, internal/install-deps.
What it can do
Measure interactive Zsh shell latency
Zsh shell configuration → Latency measurements and performance metrics
Benchmark Zsh startup time
Zsh shell with plugins and configurations → Startup time measurements
Identify slow Zsh plugins
Zsh configuration with multiple plugins → Performance analysis showing which plugins cause delays
Compare Zsh performance across different configurations
Multiple Zsh setups or configuration states → Comparative performance benchmarks
Generate performance reports for Zsh optimization
Zsh shell performance data → Detailed performance reports with optimization recommendations
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.