v2.0.02026-10-07
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 --metrics option 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).
<img width="1075" height="261" alt="image" src="https://github.com/user-attachments/assets/dda7b395-1a63-4afa-ad03-d2d0826fea00" />
- Add --env to set environment variables even without an intermediate shell (which is the new default behavior, see below). For example:
``sh
# Parameterized benchmark, comparing different thread counts:
hyperfine -P threads 1 8 --env 'OMPNUMTHREADS={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 (sh on Unix, cmd.exe on Windows), or select a shell with --shell <SHELL>. See the rationale for this change.
- Always run --setup, --prepare, --conclude, and --cleanup commands in a shell, even when using --shell=none, see #990 (@sharkdp).
- The JSON format for --export-json has 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].mean is now results[i].summary.timewallclock.mean, and results[i].times is replaced by results[i].measurements[j].timewallclock.value. The new structure looks like this:
`python
{
"schema_version": 2,
"primarymetric": "timewall_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": {"OMPNUMTHREADS": "8"}, # Only present with --env overrides
"measurements": [ # One entry per run, excluding warmups
{
"timewallclock": {"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"},
"memorypeakresident": {"value": 1048576.0, "unit": "byte"},
"cpu_cycles": {"value": 5000000}, # Hardware counters, when available
"instructions": {"value": 10000000},
"exit_code": 0
},
... # Further runs omitted
],
"summary": {
"timewallclock": {
"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 unit field. Unavailable memory measurements and hardware counters are omitted; other available counters may also be included. stddev is null for a single run.
- --time-unit/-u has been removed. Units can now be selected using the --metrics METRIC[:UNIT],… option, e.g. --metrics timewallclock:ms,memorypeakresident:MiB.
- --sort has been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format.
- --reference and --reference-name have been removed (for now). The first command is always considered as the reference command. Invocations using --reference now 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预发布2026-10-07
Changes
- Always run --setup, --prepare, --conclude, and --cleanup commands 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 -S to interpret shell syntax or -N to 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预发布2026-10-06
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 --metrics option 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 (sh on Unix, cmd.exe on Windows), or select a shell with --shell <SHELL>.
- The JSON format for --export-json has 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].mean is now results[i].summary.timewallclock.mean, and results[i].times is replaced by results[i].measurements[j].timewallclock.value. The new structure looks like this:
``python
{
"schema_version": 2,
"primarymetric": "timewall_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
{
"timewallclock": {"value": 1.0, "unit": "second"},
"time_user": {"value": 0.0, "unit": "second"},
"time_system": {"value": 0.0, "unit": "second"},
"memorypeakresident": {"value": 1048576.0, "unit": "byte"},
"exit_code": 0
},
... # Further runs omitted
],
"summary": {
"timewallclock": {
"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/-u has been removed. Units can now be selected using the --metrics METRIC[:UNIT],… option, e.g. --metrics timewallclock:ms,memorypeakresident:MiB.
- --sort has been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format.
- --reference and --reference-name have 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.02026-10-05
Features
- Add support for minutes and hours in --time-unit, as well as short and plural aliases such as ms, seconds, and min, see #960 (@sharkdp)
- Expose $HYPERFINE_ITERATION to --prepare and --conclude commands, see #781 and #807 (@willcl-ark)
- Show elapsed time during the initial benchmark run, see #416 and #581 (@devonhollowood)
- Add colors to --help output, see #841 (@starsep)
Changes
- With --parameter-scan or --parameter-list, --reference now 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-name instead of --reference-name in 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-runs instead 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.02025-11-18
Features
- Add --reference-name option to give a meaningful name to the reference command, see #808 (@niklasdewally)
- The --ignore-failure option now supports a comma-separated list of exit codes to ignore (e.g., --ignore-failure=1,2), see #836 (@sharkdp)
- Python scripts: Add --time-unit option to advanced_statistics.py (@sharkdp)
- Python scripts: Add new plot_benchmarks.py script 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
- Restrict cat tests to Unix environments, see #776 and #777 (@ritvikos)
v1.19.02024-11-11
Features
- Add a new --reference <cmd> option to specify a reference command for the relative speed comparison, see #579, #577 and #744 (@JanEricNitschke)
- Add --conclude argument (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 like hyperfine --output=null my-cmd --output=./file.log my-cmd, see #529 and #775 (@sharkdp)
- The environment variable $HYPERFINE_ITERATION will 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.02023-10-05
Features
- Add support for microseconds via --time-unit microsecond, see #684 (@sharkdp)
Bugfixes
- Proper argument quoting on Windows CMD, see #296 and #678 (@PedroWitzel)
v1.17.02023-06-04
Features
- Add new --sort option 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-count option for histogram plots, see scripts/plot_histogram.py (@sharkdp)
Changes
- Updated hyperfine to use windows-sys instead of the unmaintained winapi, 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
- Do not export intermediate results to stdout when using - as a file name, see #640 and #643 (@sharkdp)
- Markup exporting does not fail if benchmark results are zero, see #642 (@sharkdp)
v1.16.12023-03-21
Bugfixes
- Fix line-wrapping of --help text (@sharkdp)
- Fix --input=null (@sharkdp)
v1.16.02023-03-15
Features
- Added new --input option, see #541 and #563 (@snease)
- Added possibility to specify - as the filename in the --export-* options, see #615 and #623 (@humblepenguinn)
Changes
- Improve hints for outlier warnings if --warmup or --prepare are in use already, see #570 (@sharkdp)
Bugfixes
- Fix uncolored output on Windows if TERM is not set, see #583 (@nabijaczleweli)
- On Windows, only run cmd.exe with the /C option. Use -c for 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)