←back to thread

238 points hundredwatt | 1 comments | | HN request time: 0.2s | source
Show context
forrestthewoods ◴[] No.42180588[source]
Hyperfine is hyper frustrating because it only works with really really fine microsecond level benchmarks. Once you get into the millisecond range it’s worthless.
replies(2): >>42180660 #>>42182084 #
anotherhue ◴[] No.42180660[source]
It spawns a new process each time right? I would think that would but a cap on how accurate it can get.

For my purposes I use it all the time though, quick and easy sanity-check.

replies(2): >>42180722 #>>42180749 #
forrestthewoods ◴[] No.42180722[source]
The issue is it runs a kajillion tests to try and be “statistical”. But there’s no good way to say “just run it for 5 seconds and give me the best answer you can”. It’s very much designed for nanosecond to low microsecond benchmarks. Trying to fight this is trying to smash a square peg through a round hole.
replies(3): >>42180876 #>>42180891 #>>42182129 #
1. PhilipRoman ◴[] No.42180891[source]
I disagree that it is designed for nano/micro benchmarks. If you want that level of detail, you need to stay within a single process, pinned to a core which is isolated from scheduler. At least I found it almost impossible to benchmark assembly routines with it.