hyperfine --reference selects a benchmark by exact displayed name in parameter scans
Introduced 2026-10-05 · score 0.96
HOW TO USE IT
When scanning or listing parameterized benchmarks, pass `--reference` with the exact printed name of one benchmark in that invocation. Use `--command-name` to name a benchmark; `--reference-name` cannot be used with parameterized benchmarks.
hyperfine --parameter-scan <VAR> <MIN> <MAX> --command-name '<benchmark name>' '<parameterized command using {VAR}>' --command-name '<reference name>' '<reference command>' --reference '<reference name>'hyperfine --parameter-list <VAR> <comma-separated-values> --command-name '<benchmark name>' '<parameterized command using {VAR}>' --command-name '<reference name>' '<reference command>' --reference '<reference name>'WHY THIS HELPS
Use an existing benchmark as the reference while scanning or listing parameterized commands.
BEFORE THIS CHANGE
Previously, `--reference` ran a separate reference command; with `--parameter-scan` or `--parameter-list`, it now selects an existing benchmark by its full displayed name.
REQUIREMENTS AND LIMITATIONS
- Version: v1.21.0
- --parameter-scan <VAR> <MIN> <MAX>: Benchmark each value in MIN..MAX, substituting `{VAR}` in commands. Use for a parameter scan.
- --parameter-list <VAR> <VALUES>: Benchmark each comma-separated value, substituting `{VAR}` in commands. Use for a parameter list.
- --reference <CMD> (required): With a parameter scan or list, select an existing benchmark by its exact printed name; it must match exactly one benchmark.
- --command-name <NAME>: Give a command a meaningful name; can be specified multiple times for multiple commands. Use this instead of `--reference-name` with parameterized benchmarks.
- --reference-name <NAME>: Names a reference command and requires `--reference`; cannot be used with parameterized benchmarks. Use `--command-name` instead. These options are incompatible in this mode.
- The full displayed name must match exactly one benchmark.
- This behavior applies with `--parameter-scan` or `--parameter-list`.
- Use `--command-name` instead of `--reference-name` in this mode.
FIRST-PARTY EVIDENCE
- https://github.com/sharkdp/hyperfine/releases/tag/v1.21.0
- https://github.com/sharkdp/hyperfine/blob/v1.21.0/doc/hyperfine.1
Check the installed version and the source before using it. Entry JSON