A cat(1) clone for the terminal with syntax highlighting, Git change markers, and automatic paging.
sharkdp/hyperfine
A command-line tool for benchmarking commands with statistical analysis, warmup runs, and exports to CSV, JSON, Markdown and AsciiDoc.
- Stars
- 29,139
- Forks
- 555
- Open issues
- 62
- Last commit
- 10 days ago
What is it?
hyperfine measures how long shell commands take to run. You pass one or more commands, and it runs each one repeatedly, reports mean, standard deviation, median, min and max, and flags statistical outliers that may come from interference or caching effects. When multiple commands are given, it shows relative speed differences against the first command.
Beyond wall-clock time, it can collect CPU user and system time, peak memory, and on Linux hardware counters such as cycles, instructions and cache misses. Warmup runs and per-run preparation commands, such as clearing filesystem caches, let you benchmark either warm or cold cache scenarios. Parameter scans and parameter lists generate a series of benchmarks from one template.
Results can be exported as CSV, JSON, Markdown, AsciiDoc or org-mode. The JSON output can be analyzed further with the Python helper scripts in the repository, which produce histograms and whisker plots. The tool runs on Linux, macOS and Windows and is packaged for most major operating systems.
Key features
- 01Runs commands repeatedly and reports mean, median, standard deviation and min/max.
- 02Detects statistical outliers that may come from interference or caching.
- 03Supports warmup runs and preparation commands to control cache state.
- 04Parameter scans and lists generate benchmarks from a template.
- 05Collects wall-clock, CPU, memory and, on Linux, hardware counter metrics.
- 06Exports results to CSV, JSON, Markdown, AsciiDoc and org-mode.
Use cases
- Comparing the speed of two command-line tools that do the same job, such as grep and ripgrep.
- Measuring the effect of a code change on a build or script runtime across git branches.
- Testing program performance with warm versus cold disk caches.
- Producing benchmark tables for documentation or reports.
Quick start
- 1
Install on Ubuntu from the official repositories
apt install hyperfine - 2
Run a first benchmark of a command
hyperfine 'sleep 0.3'
Things to know
- Some features such as hardware counters are Linux-only or unsupported on Windows.
Topics
FAQ
- What is hyperfine?
- A command-line tool for benchmarking commands with statistical analysis, warmup runs, and exports to CSV, JSON, Markdown and AsciiDoc. hyperfine measures how long shell commands take to run. You pass one or more commands, and it runs each one repeatedly, reports mean, standard deviation, median, min and max, and flags statistical outliers that may come from interference or caching effects. When multiple commands are given, it shows relative speed differences against the first command.
- Is hyperfine free to use? What license does it have?
- hyperfine is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is hyperfine still maintained?
- Actively maintained. The last commit to hyperfine was on Oct 12, 2026.
- What can I use hyperfine for?
- Comparing the speed of two command-line tools that do the same job, such as grep and ripgrep. Measuring the effect of a code change on a build or script runtime across git branches. Testing program performance with warm versus cold disk caches. Producing benchmark tables for documentation or reports.
- How do I install hyperfine?
- Install on Ubuntu from the official repositories: apt install hyperfine Run a first benchmark of a command: hyperfine 'sleep 0.3'
- Where can I get hyperfine?
- The source code and installation instructions are on GitHub: https://github.com/sharkdp/hyperfine
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A fast, user-friendly command-line alternative to the Unix find command for locating files and directories by name.
A Rust crate for building terminal user interfaces (TUIs) with reusable widgets and a simple rendering model.
Command-line and browser cheat sheets for Unix commands and programming languages, served over curl, a CLI client, and editor plugins.
React renderer for building interactive command-line apps with components and Flexbox layouts in the terminal.
A terminal workspace and multiplexer with panes, tabs, layouts, floating panes, collaboration, and a plugin system.