News for hackers. Stuff that matters.
Re:Hyperfine: A command-line benchmarking tool by fwip on Tuesday November 19, 2024 @12:57PM (#42186330)
I've been using it for about four or five years, and never experienced this behavior.

Current defaults: "By default, it will perform at least 10 benchmarking runs and measure for at least 3 seconds." If your program takes 1s to run, it should take 10 seconds to benchmark.

Is it possible that your program was waiting for input that never came? One "gotcha" is that it expects each argument to be a full program, so if you ran `hyperfine ./a.out input.txt`, it will first bench a.out with no args, then try to bench input.txt (which will fail). If a.out reads from stdin when no argument is given, then it would hang forever, and I can see why you'd give up after a half hour.

Re:Hyperfine: A command-line benchmarking tool by sharkdp on Tuesday November 19, 2024 @01:50PM (#42186830)
> Is it possible that your program was waiting for input that never came?

We do close stdin to prevent this. So you can benchmark `cat`, for example, and it works just fine.

Re:Hyperfine: A command-line benchmarking tool by fwip on Tuesday November 19, 2024 @02:51PM (#42187384)
Oh, my bad! Thank you for the correction, and for all your work making hyperfine.