You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm opening this ticket to discuss a potential change in Hyperfine's default behavior. For now, we always use an intermediate shell to run benchmarked programs. This allows users to make use of the full shell syntax. For example, you can run things like hyperfine ~/programs/abc or hyperfine "abc && def" that wouldn't be possible without a shell. The shell-spawn time is automatically subtracted by Hyperfine. But it still adds noise to the benchmark.
The potential new default would be --shell=none which can already be used today.
This would have several advantages:
There is no additional noise in the measurement from launching the shell.
We run the program directly. All performance metrics/counters directly apply to the benchmarked program. We do not have to perform any calibration or subtraction to account for the intermediate shell.
Not having to perform calibration saves some time (~100 ms)
Disadvantages are:
you need to do things like write /home/shark/ instead of ~, expand environment variables yourself, etc. Or use --shell=… when needed. Note that quoting is supported in no-shell mode though. So command "long argument" works fine.
This might be potentially confusing to users who expect shell syntax to be available (all Hyperfine 1.0 users). If we simply fail, that's probably okay. But there might be cases where it's harder to debug what's going on (~ passed to the program unexpanded).
The text was updated successfully, but these errors were encountered:
I'm opening this ticket to discuss a potential change in Hyperfine's default behavior. For now, we always use an intermediate shell to run benchmarked programs. This allows users to make use of the full shell syntax. For example, you can run things like
hyperfine ~/programs/abc
orhyperfine "abc && def"
that wouldn't be possible without a shell. The shell-spawn time is automatically subtracted by Hyperfine. But it still adds noise to the benchmark.The potential new default would be
--shell=none
which can already be used today.This would have several advantages:
Disadvantages are:
/home/shark/
instead of~
, expand environment variables yourself, etc. Or use--shell=…
when needed. Note that quoting is supported in no-shell mode though. Socommand "long argument"
works fine.~
passed to the program unexpanded).The text was updated successfully, but these errors were encountered: