Skip to content

Releases

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 21:13

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).

    image
  • Add --env to 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 (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.time_wall_clock.mean, and results[i].times is replaced by results[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 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 time_wall_clock:ms,memory_peak_resident: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

v2.0.0-alpha.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 07 Oct 10:36

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

v2.0.0-alpha.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Oct 14: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.time_wall_clock.mean, and results[i].times is replaced by results[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/-u has been removed. Units can now be selected using the --metrics METRIC[:UNIT],… option, e.g. --metrics time_wall_clock:ms,memory_peak_resident: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.0

Choose a tag to compare

@github-actions github-actions released this 05 Oct 14:11
ad6b4e2

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

v1.20.0

Choose a tag to compare

@sharkdp sharkdp released this 18 Nov 08:38

v1.20.0

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

v1.19.0

Choose a tag to compare

@sharkdp sharkdp released this 11 Nov 21:43
12fec42

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:

Bugfixes

Other

v1.18.0

Choose a tag to compare

@sharkdp sharkdp released this 05 Oct 08:07

Features

  • Add support for microseconds via --time-unit microsecond, see #684 (@sharkdp)

Bugfixes

v1.17.0

Choose a tag to compare

@sharkdp sharkdp released this 04 Jun 06:22

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

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.1

Choose a tag to compare

@sharkdp sharkdp released this 21 Mar 20:06

Bugfixes

v1.16.0

Choose a tag to compare

@sharkdp sharkdp released this 15 Mar 09:14

Features

Changes

  • Improve hints for outlier warnings if --warmup or --prepare are in use already, see #570 (@sharkdp)

Bugfixes

Other