Earlier quoted context omitted.
Yes. If you don't make use of shell builtins/syntax, you can use hyperfine's `--shell=none`/`-N` option to disable the intermediate shell.
You still need to quote the command though. `hyperfine -N ls "$dir"' won't work, you need `hyperfine -N "ls ${dir@Q}"' or something. It'd be better if you could specify commands like with `find -exec'.
Hyperfine: A command-line benchmarking tool
21–30 of 56 posts
Re: Hyperfine: A command-line benchmarking tool
#22I've also had a good experience using the 'perf'[^1] tools for when I don't want to install 'hyperfine'. Shameless plug for a small blog post about it as I don't think it is that well known: https://usrme.xyz/tils/perf-is-more-robust-for-repeated-timi... . --- [^1]: https://www.mankier.com/1/perf
Re: Hyperfine: A command-line benchmarking tool
#23What database product does the community commonly send benchmark results to? This tool is great, but I'd love to analyze results relationally.
Re: Hyperfine: A command-line benchmarking tool
#24Hyperfine is a great tool but when I was using it at Deno to benchmark startup time there was a lot of weirdness around the operating system apparently caching inodes of executables. If you are looking at shaving sub 20ms numbers, be aware you may need to pull tricks on macos especially to get real numbers.
Windows has microsecond precision counters (see QueryPerformanceCounter and friends)
Re: Hyperfine: A command-line benchmarking tool
#25Re: Hyperfine: A command-line benchmarking tool
#26Earlier quoted context omitted.
You still need to quote the command though. `hyperfine -N ls "$dir"' won't work, you need `hyperfine -N "ls ${dir@Q}"' or something. It'd be better if you could specify commands like with `find -exec'.
Oh that sucks, I really hate when programs impose useless shell parsing instead of letting the user give an argument vector natively.
hyperfine -N -- ls "$dir" \; my_ls "$dir"Re: Hyperfine: A command-line benchmarking tool
#27I've also had a good experience using the 'perf'[^1] tools for when I don't want to install 'hyperfine'. Shameless plug for a small blog post about it as I don't think it is that well known: https://usrme.xyz/tils/perf-is-more-robust-for-repeated-timi... . --- [^1]: https://www.mankier.com/1/perf
There's also 'poop', which is a nice middle-ground between 'hyperfine' and 'perf'. https://github.com/andrewrk/poop
Re: Hyperfine: A command-line benchmarking tool
#28Hyperfine is great. I use it sometimes for some quick web page benchmarks: https://abuisman.com/posts/developer-tools/quick-page-benchm... As mentioned here in the thread, when you want to go into the single ms optimisations it is not the best approach since there is a lot of overhead especially the way I demonstrate here, but it works very well for some sanity checks.
Re: Hyperfine: A command-line benchmarking tool
#29Re: Hyperfine: A command-line benchmarking tool
#30Earlier quoted context omitted.
Oh that sucks, I really hate when programs impose useless shell parsing instead of letting the user give an argument vector natively.
I don't think it's useless. You can use hyperfine to run multiple benchmarks at the same time, to get a comparison between multiple tools. So if you want it to work without quotes, you need to (1) come up with a way to separate commands and (2) come up with a way to distinguish hyperfine arguments from command arguments. It's doable, but it's also not a great UX if you have to write something like hyperfine -N -- ls…
Looks fine to me. Obviously it's too late to undo that mistake, but a new flag to enable new behavior wouldn't hurt anyone.