←back to thread

238 points hundredwatt | 3 comments | | HN request time: 1.288s | source
Show context
mmastrac ◴[] No.42179600[source]
Hyperfine 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.

replies(3): >>42180391 #>>42182037 #>>42182986 #
1. JackYoustra ◴[] No.42180391[source]
I've found pretty good results with the System Trace template in xcode instruments. You can also stack instruments, for example combining the file inspector with a virtual memory inspector.

I've run into some memory corruption with it sometimes, though, so be wary of that. Emerge tools has an alternative for iOS at least, maybe one day they'll port it to mac.

replies(1): >>42181235 #
2. art049 ◴[] No.42181235[source]
I never tried xcode instruments. Is the UX good for this kind of tool?
replies(1): >>42189450 #
3. JackYoustra ◴[] No.42189450[source]
System trace is pretty comprehensive, as long as it's something in there and you don't need a crazy strong profiler and are okay with occasional hangs in the profiler UI, it's pretty good