HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sharkdp
hyperfine
Rust2018–2024
sharkdp / hyperfine

hyperfine

A command-line benchmarking tool

26Distinct people
35Mentions
1Explicit recommenders
29.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A command-line benchmarking tool

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

1) Did you take frequency scaling into consideration while benchmarking? 2) v8 doesn't make your code blazing fast by default. It has many optimizations but your code may be…

29athrowaway used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year35 dated mentions

Observed mentions: 2018-01-20 13:18:30 UTC to 2024-11-19 17:57:03 UTC.

0510152018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 13 mentions; 2 submissions, 11 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC523
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC211
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC312
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC624
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC13211

What Hacker News says

35 sources
> On the flip side (making things more random as opposed to less), something that randomizes the initial stack pointer would be nice, as I've sometimes seen this go really, really wrong (renaming a binary from foo to foo_new made it run >1% slower!). This is something we do already. We set a `HYPERFINE_RANDOMIZED_ENVIRONMENT_OFFSET` environment variable with a random-length value: https://github.com/sharkdp/hyperfine/blob/87d77c861f1b6c761a...
In Hyperfine: A command-line benchmarking tool
> This is not included in the core of hyperfine, but we do have scripts to compute "advanced" statistics, and to perform t-tests here: https://github.com/sharkdp/hyperfine/tree/master/scripts t-tests run afoul of the “no Gaussian assumptions”, though. Distributions arising from benchmarking frequently has various forms of skew which messes up t-tests and gives artificially narrow confidence intervals. (I'll gladly give you credit for your outlier detection, though!) >> Automatic isolation to the greatest extent possible (given appropriate permissions) > This sounds interesting. Please feel free to open a ticket if you have any ideas. Off the top of my head, some option that would: * Bind to isolated CPUs, if booted with it (isolcpus=) * Binding to a consistent set of cores/hyperthreads (the scheduler frequently sabotages benchmarking, esp
Read the rest
ecially if your cores are have very different maximum frequency) * Warns if thermal throttling is detected during the run * Warns if an inappropriate CPU governor is enabled * Locks the program into RAM (probably hard to do without some sort of help from the program) * Enables realtime priority if available (e.g., if isolcpus= is not enabled, or you're not on Linux) Of course, sometimes you would _want_ to benchmark some of these effects, and that's fine. But most people probably won't, and won't know that they exist. I may easily have forgotten some. On the flip side (making things more random as opposed to less), something that randomizes the initial stack pointer would be nice, as I've sometimes seen this go really, really wrong (renaming a binary from foo to foo_new made it run >1% slower!).
In Hyperfine: A command-line benchmarking tool
> Robust statistics with p-values (not just min/max, compensation for multiple hypotheses, no Gaussian assumptions) This is not included in the core of hyperfine, but we do have scripts to compute "advanced" statistics, and to perform t-tests here: https://github.com/sharkdp/hyperfine/tree/master/scripts Please feel free to comment here if you think it should be included in hyperfine itself: https://github.com/sharkdp/hyperfine/issues/523 > Automatic isolation to the greatest extent possible (given appropriate permissions) This sounds interesting. Please feel free to open a ticket if you have any ideas. > Interleaved execution, in case something external changes mid-way. Please see the discussion here: https://github.com/sharkdp/hyperfine/issues/21 > It just… runs things N times and then does a naïve average/min/max? While there is nothin
Read the rest
g wrong with computing average/min/max, this is not all hyperfine does. We also compute modified Z-scores to detect outliers. We use that to issue warnings, if we think the mean value is influenced by them. We also warn if the first run of a command took significantly longer than the rest of the runs and suggest counter-measures. Depending on the benchmark I do, I tend to look at either the `min` or the `mean`. If I need something more fine-grained, I export the results and use the scripts referenced above. > At that rate, one could just as well use a shell script and eyeball the results. Statistical analysis (which you can consider to be basic) is just one reason why I wrote hyperfine. The other reason is that I wanted to make benchmarking easy to use. I use warmup runs, preparation commands and parametrized benchmarks all the time. I also frequently use the Markdown export or the JSON export to generate graphs or histograms. This is my personal experience. If you are not interested in all of these features, you can obviously "just as well use a shell script".
In Hyperfine: A command-line benchmarking tool
If that's the case, I would consider it a bug. Please feel free to report it. In general, hyperfine should not take longer than ~3 seconds, unless the command itself takes > 300 ms second to run. In the latter case, we do a minimum of 10 runs by default. So if your program takes 3 min for a single iteration, it would take 30 min by default — yes. But this can be controlled using the `-m`/`--min-runs` option. You can also specify the exact amount of runs using `-r`/`--runs`, if you prefer that. > I could not find a good way to get Hyperfine to do what I wanted This is all documented here: https://github.com/sharkdp/hyperfine/tree/master?tab=readme-... under "Basic benchmarks". The options to control the amount of runs are also listed in `hyperfine --help` and in the man page. Please let us know if you think we can improve the documentation
Read the rest
/ discovery of those options.
In Hyperfine: A command-line benchmarking tool
prefix-dev/pixi is a successor to Mamba and Conda which wraps libsolv like dnf. https://github.com/prefix-dev/pixi OpenSUSE/libsolv: https://github.com/openSUSE/libsolv OpenSUSE/zypper may have wrapped or may still wrap libsolv? TIL libsolv also supports arch .apk and .deb; there's a deb2solv utility to create libsolv .solv files: https://github.com/openSUSE/libsolv/blob/master/tools/deb2so... "[mamba-org/rattler:] A new memory-safe SAT solver for package management in Rust (port of libsolv)" (2024) https://prefix.dev/blog/the_new_rattler_resolver https://news.ycombinator.com/item?id=37101862 Pixi is integrating uv: https://github.com/astral-sh/uv/issues/1572#issuecomment-194... astral-sh/uv [1] solves versions with PubGrub [2], which was written for Dart: [1] https://github.com/astral-sh/uv [2] https://github.com/pubgrub-rs/pubgrub uv's
Read the rest
benchmarks are run with hyperfine, a CLI benchmarking tool: https://github.com/sharkdp/hyperfine astral-sh/rye was mitsuhiko/rye, and rye wraps uv with "fallback to unearth [resolvelib] and pip-tools": https://github.com/astral-sh/rye https://lucumr.pocoo.org/2024/2/15/rye-grows-with-uv/ So, TIL it looks like rye for python and pixi for conda (python, r, rust, go,) are the latest tools for python packaging, not apt packaging. fpm is one way to create deb packages from python virtualenvs for install with the new APT solver, which resulted in this research.
In The new APT 3.0 solver
somewhat off-topic, but I want to share hyperfine[1], which is nearly purpose-built for measuring this kind of performance: $ hyperfine --shell=none "node -e ''" "python -c pass" "perl -e ''" "php -r ''" "bash -c ''" "echo" Benchmark 1: node -e '' Time (mean ± σ): 87.3 ms ± 8.0 ms [User: 69.8 ms, System: 18.4 ms] Range (min … max): 77.9 ms … 111.1 ms 31 runs Benchmark 2: python -c pass Time (mean ± σ): 24.4 ms ± 5.6 ms [User: 17.5 ms, System: 6.7 ms] Range (min … max): 15.8 ms … 31.3 ms 97 runs Benchmark 3: perl -e '' Time (mean ± σ): 2.8 ms ± 0.6 ms [User: 0.9 ms, System: 1.8 ms] Range (min … max): 1.7 ms … 3.9 ms 863 runs Benchmark 4: php -r '' Time (mean ± σ): 19.3 ms ± 4.2 ms [User: 8.9 ms, Sys
Read the rest
tem: 10.0 ms] Range (min … max): 12.1 ms … 24.8 ms 241 runs Benchmark 5: bash -c '' Time (mean ± σ): 4.9 ms ± 0.8 ms [User: 2.8 ms, System: 1.8 ms] Range (min … max): 2.6 ms … 6.4 ms 552 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. Benchmark 6: echo Time (mean ± σ): 1.2 ms ± 0.3 ms [User: 0.7 ms, System: 0.3 ms] Range (min … max): 0.8 ms … 2.1 ms 2237 runs Summary echo ran 2.41 ± 0.89 times faster than perl -e '' 4.17 ± 1.39 times faster than bash -c '' 16.37 ± 5.91 times faster than php -r '' 20.74 ± 7.64 times faster than python -c pass 74.21 ± 22.49 times faster than node -e '' (tested with node 21.5.0, python 3.11.6, perl 5.38.1, php 8.2.14, and bash 5.2.21 on Ryzen 2700X) [1]: https://github.com/sharkdp/hyperfine
In Web CGI programs aren't particularly slow these days
> It is very possible to write sub 100ms procedures in TS, […] I won’t dispute this statement since I currently lack the means to assess inshellisense. Would it be possible for you (or someone with a functional Node + NPM setup) to install inshellisense and share the actual performance figures? You could use a tool like hyperfine (https://github.com/sharkdp/hyperfine) for this purpose. As an attempt to test this myself, I used a Docker image (version 21.1.0-bookworm from https://hub.docker.com/_/node/). The TypeScript tool installed without any issues, along with the binding, which simply adds the following line into ~/.bashrc: [ -f ~/.inshellisense/key-bindings.bash ] && source ~/.inshellisense/key-bindings.bash However, when I initiated a new Bash session within the same Docker container to activate the updated Bash configuration,
Read the rest
I encountered the following error: bash: /root/.inshellisense/key-bindings.bash: line 1: syntax error near unexpected token `$'{\r'' 'ash: /root/.inshellisense/key-bindings.bash: line 1: `__inshellisense__() { Due to this issue, I am unable to perform a performance test using hyperfine. The version of Bash available in this Docker image is 5.2.15(1)-release. I verified that the content of /root/.inshellisense/key-bindings.bash is exactly the same as https://github.com/microsoft/inshellisense/blob/main/shell/k...
In Show HN: Inshellisense – IDE style shell autocomplete

Showing the 15 most recent of 35 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.