mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-14 08:21:39 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c4612401a | ||
|
|
cdbca1bf1e |
@@ -89,7 +89,7 @@ hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'
|
||||
|
||||
### Intermediate shell
|
||||
|
||||
By default, commands are executed using `sh` on Unix (resolved through `PATH`) or `cmd.exe` on Windows.
|
||||
By default, commands are executed using a predefined shell (`/bin/sh` on Unix, `cmd.exe` on Windows).
|
||||
If you want to use a different shell, you can use the `-S, --shell <SHELL>` option:
|
||||
```sh
|
||||
hyperfine --shell zsh 'for i in {1..10000}; do echo test; done'
|
||||
@@ -104,7 +104,7 @@ If you want to run a benchmark *without an intermediate shell*, you can use the
|
||||
option. This is helpful for very fast commands (< 5 ms) where the shell startup overhead correction would
|
||||
produce a significant amount of noise. Note that you cannot use shell syntax like `*` or `~` in this case.
|
||||
```
|
||||
hyperfine -N 'grep TODO /home/user'
|
||||
hyperfine -N 'grep -R TODO /home/user'
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user