hyperfine
Command-line benchmarking tool that runs statistical analysis across multiple timing runs of shell commands
hyperfine is a command-line benchmarking tool that performs statistical analysis across multiple runs of shell commands. It automatically determines the optimal number of runs (minimum 10) and measurement duration (minimum 3 seconds) to produce reliable timing statistics. The tool supports comparing multiple commands side-by-side and provides statistical outlier detection to identify interference from other programs or caching effects.
The tool includes advanced features for controlling benchmark conditions. Users can configure warmup runs to test with hot caches, or use preparation commands to clear caches before each timing run. Parameterized benchmarks allow testing across ranges of values, such as varying thread counts or input sizes. hyperfine corrects for shell spawning overhead by measuring shell startup time and subtracting it from results, or can run commands directly without an intermediate shell for very fast operations.
hyperfine exports results to multiple formats including CSV, JSON, Markdown, and AsciiDoc. The JSON output integrates with Python analysis scripts included in the repository for creating histograms and whisker plots. The tool runs on Linux, macOS, and Windows, supporting arbitrary shell commands and custom shell environments.
Installation
# via Homebrew
brew install hyperfine
# via apt
apt install hyperfine
# via Cargo
cargo install --locked hyperfine



Alternatives & related tools
fnm
Fast Node.js version manager built in Rust with support for .node-version and .nvmrc files
difftastic
Structural diff tool that compares files based on their syntax rather than lines
mise
CLI tool for managing development environments with version-controlled tools, environment variables, and tasks
zellij
Terminal multiplexer with floating panes, multiplayer collaboration, WebAssembly plugins, and built-in web client
just
Command runner that saves and runs project-specific commands from a justfile with make-inspired syntax
add a badge to your README
Maintain hyperfine? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/hyperfine?utm_source=badge)<a href="https://www.trmn.sh/tools/hyperfine?utm_source=badge"><img src="https://www.trmn.sh/badge/hyperfine.svg" alt="Featured on trmn" height="20"></a>