Repository navigation
Releases
v2.0.0
See the breaking changes below when migrating from hyperfine 1.x.
Features
-
Add support for alternative performance metrics (peak memory usage, instructions, CPU cycles, cache misses, branch misses, ...). By default, hyperfine will now display wall-clock time and peak memory usage, but users can use the new
--metricsoption to select different performance metrics. The terminal output now shows an overview of all selected performance metrics (see here for a run with more metrics enabled).
-
Add
--envto set environment variables even without an intermediate shell (which is the new default behavior, see below). For example:# Parameterized benchmark, comparing different thread counts: hyperfine -P threads 1 8 --env 'OMP_NUM_THREADS={threads}' 'my_command'
-
The plotting and analysis scripts now support different metrics as well, see #981 and #984 (@sharkdp).
Breaking changes
-
Benchmarked commands are now executed directly by default, without an intermediate shell (
--shell=none). Use-S(an alias for--shell=default) to restore the previous behavior (shon Unix,cmd.exeon Windows), or select a shell with--shell <SHELL>. See the rationale for this change. -
Always run
--setup,--prepare,--conclude, and--cleanupcommands in a shell, even when using--shell=none, see #990 (@sharkdp). -
The JSON format for
--export-jsonhas changed (schema version 2). The new format now includes metadata, per-run measurements, and statistical summaries for all measured quantities, see #790 (@sharkdp). Code that reads those exported JSON files must be updated. For example,results[i].meanis nowresults[i].summary.time_wall_clock.mean, andresults[i].timesis replaced byresults[i].measurements[j].time_wall_clock.value. The new structure looks like this:{ "schema_version": 2, "primary_metric": "time_wall_clock", "metadata": { "hyperfine_version": "2.0.0", "start_time": "2026-10-06T12:00:00Z", "platform": {"os": "Linux", "architecture": "x86_64"} }, "results": [ { "command": "sleep 1", # Actual command after parameter substitution "name": "wait 1s", # Optional custom or automatically generated name "parameters": {"duration": {"value": "1"}}, # For parametrized runs "environment": {"OMP_NUM_THREADS": "8"}, # Only present with --env overrides "measurements": [ # One entry per run, excluding warmups { "time_wall_clock": {"value": 1.0, "unit": "second"}, "time_cpu": {"value": 0.0, "unit": "second"}, "time_user": {"value": 0.0, "unit": "second"}, "time_system": {"value": 0.0, "unit": "second"}, "memory_peak_resident": {"value": 1048576.0, "unit": "byte"}, "cpu_cycles": {"value": 5000000}, # Hardware counters, when available "instructions": {"value": 10000000}, "exit_code": 0 }, ... # Further runs omitted ], "summary": { "time_wall_clock": { "unit": "second", "count": 30, "mean": 1.0, "stddev": 0.0, "median": 1.0, "min": 1.0, "max": 1.0 } # Other metrics have the same summary structure. } } ] }Times are always exported in seconds and memory in bytes. Hardware counters and their summaries have no
unitfield. Unavailable memory measurements and hardware counters are omitted; other available counters may also be included.stddevisnullfor a single run. -
--time-unit/-uhas been removed. Units can now be selected using the--metrics METRIC[:UNIT],β¦option, e.g.--metrics time_wall_clock:ms,memory_peak_resident:MiB. -
--sorthas been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format. -
--referenceand--reference-namehave been removed (for now). The first command is always considered as the reference command. Invocations using--referencenow show migration guidance to put the reference command first. -
The format of Markdown, AsciiDoc and org-mode, and CSV exports has also been changed. Markdown, AsciiDoc, and org-mode contain only the primary metric (the first metric selected by
--metrics). CSV exports all selected metrics side by side.
v2.0.0-alpha.2
Changes
- Always run
--setup,--prepare,--conclude, and--cleanupcommands in a shell, even when benchmarked commands run directly. Improve error messages for these commands, see #990 (@sharkdp). - Require an explicit shell choice for commands containing unquoted, standalone shell operators such as
&&or>: use-Sto interpret shell syntax or-Nto pass operators as literal arguments (@sharkdp). - Use a compact output layout on narrow terminals (@sharkdp).
- Make plotting and analysis scripts runnable directly from GitHub with
uvx --from 'git+https://github.com/sharkdp/hyperfine' <script>(@sharkdp).
v2.0.0-alpha.1
This is the first alpha release of hyperfine 2.0. Command-line options and export formats may change before the stable release. See the breaking changes below when migrating from hyperfine 1.x.
Features
- Add support for alternative performance metrics (peak memory usage, CPU cycles, instructions, cache misses, branch misses, ...). By default, hyperfine will now display wall-clock time and peak memory usage (wall-clock time only on Windows),
but users can use the new--metricsoption to select different performance metrics. - The terminal output now shows an overview of all selected performance metrics, including relative changes.
- Python plotting and analysis scripts support the new JSON format and can select performance metrics with
--metric, see #981 and #984 (@sharkdp).
Breaking changes
-
Benchmarked commands are now executed directly by default, without an intermediate shell (
--shell=none). Use-S(an alias for--shell=default) to restore the previous behavior (shon Unix,cmd.exeon Windows), or select a shell with--shell <SHELL>. -
The JSON format for
--export-jsonhas changed (schema version 2). The new format now includes metadata, per-run measurements, and statistical summaries for all measured quantities, see #790 (@sharkdp). Code that reads those exported JSON files must be updated. For example,results[i].meanis nowresults[i].summary.time_wall_clock.mean, andresults[i].timesis replaced byresults[i].measurements[j].time_wall_clock.value. The new structure looks like this:{ "schema_version": 2, "primary_metric": "time_wall_clock", "metadata": { "hyperfine_version": "2.0.0-alpha.1", "start_time": "2026-10-06T12:00:00Z", "platform": {"os": "Linux", "architecture": "x86_64"} }, "results": [ { "command": "sleep 1", # Actual command after parameter substitution "name": "wait 1s", # Optional custom name, separate from the command "parameters": {"duration": {"value": "1"}}, # Values are now objects "measurements": [ # One entry per run, excluding warmups { "time_wall_clock": {"value": 1.0, "unit": "second"}, "time_user": {"value": 0.0, "unit": "second"}, "time_system": {"value": 0.0, "unit": "second"}, "memory_peak_resident": {"value": 1048576.0, "unit": "byte"}, "exit_code": 0 }, ... # Further runs omitted ], "summary": { "time_wall_clock": { "unit": "second", "count": 2, "mean": 1.0, "stddev": 0.0, "median": 1.0, "min": 1.0, "max": 1.0 } # Other metrics have the same summary structure. } } ] }Times are always exported in seconds and memory in bytes.
-
--time-unit/-uhas been removed. Units can now be selected using the--metrics METRIC[:UNIT],β¦option, e.g.--metrics time_wall_clock:ms,memory_peak_resident:MiB. -
--sorthas been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format. -
--referenceand--reference-namehave been removed (for now). The first command is always considered as the reference command. -
The format of Markdown, AsciiDoc, org-mode and CSV exports has also been changed. These formats contain only the primary metric (the first metric selected by
--metrics). CSV now includes columns with the name and the unit of the primary metric.
v1.21.0
Features
- Add support for minutes and hours in
--time-unit, as well as short and plural aliases such asms,seconds, andmin, see #960 (@sharkdp) - Expose
$HYPERFINE_ITERATIONto--prepareand--concludecommands, see #781 and #807 (@willcl-ark) - Show elapsed time during the initial benchmark run, see #416 and #581 (@devonhollowood)
- Add colors to
--helpoutput, see #841 (@starsep)
Changes
- With
--parameter-scanor--parameter-list,--referencenow selects an existing benchmark by its full displayed name instead of running a separate reference command. The name must match exactly one benchmark; use--command-nameinstead of--reference-namein this mode, see #847 and #979 (@sharkdp) - Format times in CSV exports with six decimal places, see #966 and #972 (@sharkdp)
- Update dependencies and raise the minimum supported Rust version to 1.97, see #934 (@sharkdp)
Bugfixes
- Make Markdown, AsciiDoc, and Org-mode exports compare against the specified reference, and label faster and slower results in command-sorted comparisons with
--reference, see #811 and #979 (@sharkdp) - Reject zero values for
--runs,--min-runs, and--max-runsinstead of allowing invalid run counts, see #923 (@VXNCXNX, @sharkdp) - Reject negative parameter-scan steps before expanding ranges, avoiding hangs and excessive memory use, see #951 (@Likio3000)
- Preserve existing export files when command options are invalid, see #950 (@Likio3000)
- Truncate export files when rewriting results to avoid leaving trailing bytes, see #970 (@sharkdp)
- Preserve backticks in command names in Markdown exports, see #947 (@Likio3000)
- Handle broken output pipes gracefully instead of panicking, see #932 (@Mathjk)
- Collect peak memory usage separately for each command on Unix, so commands no longer inherit the peak memory usage of earlier commands, see #965 (@sharkdp)
- Preserve 100-nanosecond precision in Windows CPU times, see #964 (@sharkdp)
- Python scripts: Correct the interpretation of Welch's t-test results, see #943 (@sharkdp)
Other
- Build binaries for Windows ARM64 and Linux ARM64 musl, see #922 and #924 (@meop)
- Refactor measurement, statistics, and formatting code to use typed quantities, see #954, #958, #961, #967, #969, #971, and #976 (@sharkdp)
- Improve documentation and examples, including comparisons across Git branches, iteration variables, reference commands, and selective failure handling, see #899, #900, #929, and #940 (@xfocus3, @ded-furby, @Likio3000, @sharkdp)
v1.20.0
v1.20.0
Features
- Add
--reference-nameoption to give a meaningful name to the reference command, see #808 (@niklasdewally) - The
--ignore-failureoption now supports a comma-separated list of exit codes to ignore (e.g.,--ignore-failure=1,2), see #836 (@sharkdp) - Python scripts: Add
--time-unitoption toadvanced_statistics.py(@sharkdp) - Python scripts: Add new
plot_benchmarks.pyscript for plotting collections of benchmarks, see #806 (@marxin)
Bugfixes
- Fix bug where naming individual commands with parameter scan was not working correctly, see #794 (@teofr)
Other
v1.19.0
Features
- Add a new
--reference <cmd>option to specify a reference command for the relative speed comparison, see #579, #577 and #744 (@JanEricNitschke) - Add
--concludeargument (analog to--prepare), see #565 and #719 as well as the docs here (@jackoconnordev) - Allow
--output=β¦to appear once for each command, enabling use cases likehyperfine --output=null my-cmd --output=./file.log my-cmd, see #529 and #775 (@sharkdp) - The environment variable
$HYPERFINE_ITERATIONwill now contain the current iteration number for each benchmarked command, see #775 (@sharkdp) - Add iteration information to failure error message, see #771 and #772 (@sharkdp)
- Python scripts:
- legend modification parameters and output DPI, see #758 (@Spreadcat)
- Nicer whiskers plot, see #727 (@serpent7776)
Bugfixes
- ETA not clearly visible on terminals with a block cursor, see #698 and #699 (@overclockworked64)
- Fix zsh completions, see #717 (@xzfc)
Other
- Build binaries for aarch64-apple-darwin, see #728 (@Phault)
- Various cleanups (@hamirmahal, @one230six)
v1.18.0
v1.17.0
Features
- Add new
--sortoption to control the order in the rel. speed comparison and in markup export formats, see #601, #614, #655 (@sharkdp) - Parameters which are unused in the command line are now displayed in parentheses, see #600 and #644 (@sharkdp).
- Added
--log-countoption for histogram plots, seescripts/plot_histogram.py(@sharkdp)
Changes
- Updated hyperfine to use
windows-sysinstead of the unmaintainedwinapi, see #624, #639, #636, #641 (@clemenswasser) - Silenced deprecation warning in Python scripts, see #633 (@nicovank)
- Major update of the man page, see 0ce6578, #647 (@sharkdp)
Bugfixes
v1.16.1
v1.16.0
Features
- Added new
--inputoption, see #541 and #563 (@snease) - Added possibility to specify
-as the filename in the--export-*options, see #615 and #623 (@humblepenguinn)
Changes
Bugfixes
- Fix uncolored output on Windows if
TERMis not set, see #583 (@nabijaczleweli) - On Windows, only run
cmd.exewith the/Coption. Use-cfor all other shells, see #568 and #582 (@FilipAndersson245)
Other
- Thanks to @berombau for working on dependency upgrades, see #584
- Fixed installationm on Windows, see #595 and #596 (@AntoniosBarotsis)