hyperfine is a command-line benchmarking tool that runs statistical analysis across multiple executions of arbitrary shell commands. It provides constant feedback on benchmark progress, supports warmup runs and cache-clearing preparation commands, detects statistical outliers, and exports results to CSV, JSON, Markdown, and AsciiDoc. It works cross-platform and supports parameterized benchmarks for varying arguments like thread counts.
sharkdp/hyperfine is a third-party open-source project, listed here from public GitHub data. ImuTechz did not write it and has not reviewed or security-audited its code. Read the source and its permissions before you install or run it.
Features
Statistical analysis across multiple runs with progress feedback
Warmup runs and cache-clearing preparation commands
Statistical outlier detection for interference and caching effects
Export results to CSV, JSON, Markdown, and AsciiDoc
Parameterized benchmarks with numeric scans and value lists
Cross-platform with configurable shell execution
Best for
Comparing performance of different commands or programs
Measuring execution time with statistical confidence
Benchmarking with varied parameters like thread counts
Testing cold vs warm cache performance
Pros
Automatic run count determination targeting 3 seconds
Corrects for shell spawning overhead when using shell syntax
Supports git branch comparison via --setup and --parameter-list
Provides $HYPERFINE ITERATION for unique per-run outputs
Cons
Requires sudo for cache-clearing commands on Linux
Shell syntax requires explicit -S flag or --shell option
Fast commands (<5 ms) may have noise from shell overhead