Compare commits

...
Author SHA1 Message Date
Charlie Tonneslan 4917c557e4 Fix "modifized" typo on modified_zscores docstring
Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
2026-10-05 12:09:44 +02:00
David Peter a2d7094282 Merge pull request #900 from ded-furby/docs/hyperfine-iteration-readme
docs: mention HYPERFINE_ITERATION in README
2026-10-05 12:07:23 +02:00
David Peter a6c301099b Merge pull request #967 from sharkdp/codex/quantity-formatting
Extract typed quantity formatting
2026-10-05 11:59:04 +02:00
David Peter 88a9150b4c Merge pull request #899 from xfocus3/docs/compare-git-branches-606
docs: show how to benchmark across git branches
2026-10-05 11:56:15 +02:00
David Peter 094d0121ef docs: simplify branch comparison example 2026-10-05 11:53:24 +02:00
xfocus3 c974f9b4d9 docs: mention branch checkout side effect 2026-10-05 11:53:07 +02:00
xfocus3 e1fa3ace8d docs: show how to benchmark across git branches 2026-10-05 11:53:07 +02:00
ded-furby 0d6ade930a docs: mention HYPERFINE_ITERATION in README 2026-06-02 01:25:13 +10:00
2 changed files with 17 additions and 1 deletions

No files matched your search

+16
View File
@@ -88,6 +88,22 @@ option:
hyperfine -L compiler g++,clang++ '{compiler} -O2 main.cpp'
```
A common use case is comparing the same command across multiple Git branches. Use `--setup`
to switch branches once before each set of timing runs, so the branch switch is not part of
the measured command:
```sh
hyperfine \
--parameter-list branch main,performance-improvements \
--setup 'git switch {branch}' \
'python main.py'
```
If you need a unique value for each individual run of a benchmark command, hyperfine also exposes
the zero-based `$HYPERFINE_ITERATION` environment variable inside the benchmarked command itself:
```sh
hyperfine 'my-command > output-${HYPERFINE_ITERATION}.log'
```
### Intermediate shell
By default, commands are executed using `sh` on Unix (resolved through `PATH`) or `cmd.exe` on Windows.
+1 -1
View File
@@ -106,7 +106,7 @@ pub fn standard_deviation<Q: UnsafeRawValue>(values: &[Q], mean: Q) -> Q {
Q::unsafe_from_raw_value((sum / (values.len() as f64 - 1.0)).sqrt())
}
/// Compute modifized Z-scores for a given sample. A (unmodified) Z-score is defined by
/// Compute modified Z-scores for a given sample. A (unmodified) Z-score is defined by
/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `(x_i - x_median)/MAD`
/// where MAD is the median absolute deviation.
///