[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5363":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},5363,"hyperfine","sharkdp\u002Fhyperfine","sharkdp","A command-line benchmarking tool","",null,"Rust",28284,484,106,52,0,10,55,191,50,43.06,"Apache License 2.0",false,"master",[26,27,28,29,30,31],"benchmark","cli","command-line","rust","terminal","tool","2026-06-12 02:01:09","# hyperfine\n[![CICD](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Factions\u002Fworkflows\u002FCICD.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Factions\u002Fworkflows\u002FCICD.yml)\n[![Version info](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fhyperfine.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fhyperfine)\n[中文](https:\u002F\u002Fgithub.com\u002Fchinanf-boy\u002Fhyperfine-zh)\n\nA command-line benchmarking tool.\n\n**Demo**: Benchmarking [`fd`](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd) and\n[`find`](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Ffindutils\u002F):\n\n![hyperfine](https:\u002F\u002Fi.imgur.com\u002Fz19OYxE.gif)\n\n## Features\n\n* Statistical analysis across multiple runs.\n* Support for arbitrary shell commands.\n* Constant feedback about the benchmark progress and current estimates.\n* Warmup runs can be executed before the actual benchmark.\n* Cache-clearing commands can be set up before each timing run.\n* Statistical outlier detection to detect interference from other programs and caching effects.\n* Export results to various formats: CSV, JSON, Markdown, AsciiDoc.\n* Parameterized benchmarks (e.g. vary the number of threads).\n* Cross-platform\n\n## Usage\n\n### Basic benchmarks\n\nTo run a benchmark, you can simply call `hyperfine \u003Ccommand>...`. The argument(s) can be any\nshell command. For example:\n```sh\nhyperfine 'sleep 0.3'\n```\n\nHyperfine will automatically determine the number of runs to perform for each command. By default,\nit will perform *at least* 10 benchmarking runs and measure for at least 3 seconds. To change this,\nyou can use the `-r`\u002F`--runs` option:\n```sh\nhyperfine --runs 5 'sleep 0.3'\n```\n\nIf you want to compare the runtimes of different programs, you can pass multiple commands:\n```sh\nhyperfine 'hexdump file' 'xxd file'\n```\n\n### Warmup runs and preparation commands\n\nFor programs that perform a lot of disk I\u002FO, the benchmarking results can be heavily influenced\nby disk caches and whether they are cold or warm.\n\nIf you want to run the benchmark on a warm cache, you can use the `-w`\u002F`--warmup` option to\nperform a certain number of program executions before the actual benchmark:\n```sh\nhyperfine --warmup 3 'grep -R TODO *'\n```\n\nConversely, if you want to run the benchmark for a cold cache, you can use the `-p`\u002F`--prepare`\noption to run a special command before *each* timing run. For example, to clear harddisk caches\non Linux, you can run\n```sh\nsync; echo 3 | sudo tee \u002Fproc\u002Fsys\u002Fvm\u002Fdrop_caches\n```\nTo use this specific command with hyperfine, call `sudo -v` to temporarily gain sudo permissions\nand then call:\n```sh\nhyperfine --prepare 'sync; echo 3 | sudo tee \u002Fproc\u002Fsys\u002Fvm\u002Fdrop_caches' 'grep -R TODO *'\n```\n\n### Parameterized benchmarks\n\nIf you want to run a series of benchmarks where a single parameter is varied (say, the number of\nthreads), you can use the `-P`\u002F`--parameter-scan` option and call:\n```sh\nhyperfine --prepare 'make clean' --parameter-scan num_threads 1 12 'make -j {num_threads}'\n```\nThis also works with decimal numbers. The `-D`\u002F`--parameter-step-size` option can be used\nto control the step size:\n```sh\nhyperfine --parameter-scan delay 0.3 0.7 -D 0.2 'sleep {delay}'\n```\nThis runs `sleep 0.3`, `sleep 0.5` and `sleep 0.7`.\n\nFor non-numeric parameters, you can also supply a list of values with the `-L`\u002F`--parameter-list`\noption:\n```\nhyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'\n```\n\n### Intermediate shell\n\nBy default, commands are executed using a predefined shell (`\u002Fbin\u002Fsh` on Unix, `cmd.exe` on Windows).\nIf you want to use a different shell, you can use the `-S, --shell \u003CSHELL>` option:\n```sh\nhyperfine --shell zsh 'for i in {1..10000}; do echo test; done'\n```\n\nNote that hyperfine always *corrects for the shell spawning time*. To do this, it performs a calibration\nprocedure where it runs the shell with an empty command (multiple times), to measure the startup time\nof the shell. It will then subtract this time from the total to show the actual time used by the command\nin question.\n\nIf you want to run a benchmark *without an intermediate shell*, you can use the `-N` or `--shell=none`\noption. This is helpful for very fast commands (\u003C 5 ms) where the shell startup overhead correction would\nproduce a significant amount of noise. Note that you cannot use shell syntax like `*` or `~` in this case.\n```\nhyperfine -N 'grep TODO \u002Fhome\u002Fuser'\n```\n\n\n### Shell functions and aliases\n\nIf you are using bash, you can export shell functions to directly benchmark them with hyperfine:\n\n```bash\nmy_function() { sleep 1; }\nexport -f my_function\nhyperfine --shell=bash my_function\n```\n\nOtherwise, inline them into or source them from the benchmarked program:\n\n```sh\nhyperfine 'my_function() { sleep 1; }; my_function'\n\necho 'alias my_alias=\"sleep 1\"' > \u002Ftmp\u002Fmy_alias.sh\nhyperfine '. \u002Ftmp\u002Fmy_alias.sh; my_alias'\n```\n\n### Exporting results\n\nHyperfine has multiple options for exporting benchmark results to CSV, JSON, Markdown and other\nformats (see `--help` text for details).\n\n#### Markdown\n\nYou can use the `--export-markdown \u003Cfile>` option to create tables like the following:\n\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\n|:---|---:|---:|---:|---:|\n| `find . -iregex '.*[0-9]\\.jpg$'` | 2.275 ± 0.046 | 2.243 | 2.397 | 9.79 ± 0.22 |\n| `find . -iname '*[0-9].jpg'` | 1.427 ± 0.026 | 1.405 | 1.468 | 6.14 ± 0.13 |\n| `fd -HI '.*[0-9]\\.jpg$'` | 0.232 ± 0.002 | 0.230 | 0.236 | 1.00 |\n\n#### JSON\n\nThe JSON output is useful if you want to analyze the benchmark results in more detail. The\n[`scripts\u002F`](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Ftree\u002Fmaster\u002Fscripts) folder includes a lot\nof helpful Python programs to further analyze benchmark results and create helpful\nvisualizations, like a histogram of runtimes or a whisker plot to compare\nmultiple benchmarks:\n\n| ![](doc\u002Fhistogram.png) | ![](doc\u002Fwhisker.png) |\n|---:|---:|\n\n\n### Detailed benchmark flowchart\n\nThe following chart explains the execution order of various timing runs when using options\nlike `--warmup`, `--prepare \u003Ccmd>`, `--setup \u003Ccmd>` or `--cleanup \u003Ccmd>`:\n\n![](doc\u002Fexecution-order.png)\n\n## Installation\n\n[![Packaging status](https:\u002F\u002Frepology.org\u002Fbadge\u002Fvertical-allrepos\u002Fhyperfine.svg?columns=3&exclude_unsupported=1)](https:\u002F\u002Frepology.org\u002Fproject\u002Fhyperfine\u002Fversions)\n\n### On Ubuntu\n\nOn Ubuntu, hyperfine can be installed [from the official repositories](https:\u002F\u002Flaunchpad.net\u002Fubuntu\u002F+source\u002Frust-hyperfine):\n```\napt install hyperfine\n```\n\nAlternatively, for the latest version, you can download the appropriate `.deb` package from the [Release page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Freleases) and install it via `dpkg`:\n```\nwget https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Freleases\u002Fdownload\u002Fv1.20.0\u002Fhyperfine_1.20.0_amd64.deb\nsudo dpkg -i hyperfine_1.20.0_amd64.deb\n```\n\n### On Fedora\n\nOn Fedora, hyperfine can be installed from the official repositories:\n\n```sh\ndnf install hyperfine\n```\n\n### On Alpine Linux\n\nOn Alpine Linux, hyperfine can be installed [from the official repositories](https:\u002F\u002Fpkgs.alpinelinux.org\u002Fpackages?name=hyperfine):\n```\napk add hyperfine\n```\n\n### On Arch Linux\n\nOn Arch Linux, hyperfine can be installed [from the official repositories](https:\u002F\u002Farchlinux.org\u002Fpackages\u002Fextra\u002Fx86_64\u002Fhyperfine\u002F):\n```\npacman -S hyperfine\n```\n\n### On Debian Linux\n\nOn Debian Linux, hyperfine can be installed [from the official repositories](https:\u002F\u002Fpackages.debian.org\u002Fhyperfine):\n```\napt install hyperfine\n```\n\n### On Exherbo Linux\n\nOn Exherbo Linux, hyperfine can be installed [from the rust repositories](https:\u002F\u002Fgitlab.exherbo.org\u002Fexherbo\u002Frust\u002F-\u002Ftree\u002Fmaster\u002Fpackages\u002Fsys-apps\u002Fhyperfine):\n```\ncave resolve -x repository\u002Frust\ncave resolve -x hyperfine\n```\n\n### On Funtoo Linux\n\nOn Funtoo Linux, hyperfine can be installed [from core-kit](https:\u002F\u002Fgithub.com\u002Ffuntoo\u002Fcore-kit\u002Ftree\u002F1.4-release\u002Fapp-benchmarks\u002Fhyperfine):\n```\nemerge app-benchmarks\u002Fhyperfine\n```\n\n### On NixOS\n\nOn NixOS, hyperfine can be installed [from the official repositories](https:\u002F\u002Fnixos.org\u002Fnixos\u002Fpackages.html?query=hyperfine):\n```\nnix-env -i hyperfine\n```\n\n### On Flox\n\nOn Flox, hyperfine can be installed as follows.\n```\nflox install hyperfine\n```\nHyperfine's version in Flox follows that of Nix.\n\n### On openSUSE\n\nOn openSUSE, hyperfine can be installed [from the official repositories](https:\u002F\u002Fsoftware.opensuse.org\u002Fpackage\u002Fhyperfine):\n```\nzypper install hyperfine\n```\n\n### On Void Linux\n\nHyperfine can be installed via xbps\n\n```\nxbps-install -S hyperfine\n```\n\n### On macOS\n\nHyperfine can be installed via [Homebrew](https:\u002F\u002Fbrew.sh):\n```\nbrew install hyperfine\n```\n\nOr you can install using [MacPorts](https:\u002F\u002Fwww.macports.org):\n```\nsudo port selfupdate\nsudo port install hyperfine\n```\n\n### On FreeBSD\n\nHyperfine can be installed via pkg:\n```\npkg install hyperfine\n```\n\n### On OpenBSD\n\n```\ndoas pkg_add hyperfine\n```\n\n### On Windows\n\nHyperfine can be installed via [Chocolatey](https:\u002F\u002Fcommunity.chocolatey.org\u002Fpackages\u002Fhyperfine), [Scoop](https:\u002F\u002Fscoop.sh\u002F#\u002Fapps?q=hyperfine&s=0&d=1&o=true&id=8f7c10f75ecf5f9e42a862c615257328e2f70f61), or [Winget](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fwinget-pkgs\u002Ftree\u002Fmaster\u002Fmanifests\u002Fs\u002Fsharkdp\u002Fhyperfine):\n```\nchoco install hyperfine\n```\n```\nscoop install hyperfine\n```\n```\nwinget install hyperfine\n```\n\n### With conda\n\nHyperfine can be installed via [`conda`](https:\u002F\u002Fconda.io\u002Fen\u002Flatest\u002F) from the [`conda-forge`](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fhyperfine) channel:\n```\nconda install -c conda-forge hyperfine\n```\n\n### With cargo (Linux, macOS, Windows)\n\nHyperfine can be installed from source via [cargo](https:\u002F\u002Fdoc.rust-lang.org\u002Fcargo\u002F):\n```\ncargo install --locked hyperfine\n```\n\nMake sure that you use Rust 1.76 or newer.\n\n### From binaries (Linux, macOS, Windows)\n\nDownload the corresponding archive from the [Release page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Freleases).\n\n## Alternative tools\n\nHyperfine is inspired by [bench](https:\u002F\u002Fgithub.com\u002FGabriella439\u002Fbench).\n\n## Integration with other tools\n\n[Chronologer](https:\u002F\u002Fgithub.com\u002Fdandavison\u002Fchronologer) is a tool that uses `hyperfine` to\nvisualize changes in benchmark timings across your Git history.\n\n[Bencher](https:\u002F\u002Fgithub.com\u002Fbencherdev\u002Fbencher) is a continuous benchmarking tool that supports `hyperfine` to\ntrack benchmarks and catch performance regressions in CI.\n\nDrop hyperfine JSON outputs onto the [Venz](https:\u002F\u002Ftry.venz.dev) chart to visualize the results,\nand manage hyperfine configurations.\n\nMake sure to check out the [`scripts` folder](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine\u002Ftree\u002Fmaster\u002Fscripts)\nin this repository for a set of tools to work with `hyperfine` benchmark results.\n\n## Origin of the name\n\nThe name *hyperfine* was chosen in reference to the hyperfine levels of caesium 133 which play a crucial role in the\n[definition of our base unit of time](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSecond#History_of_definition)\n— the second.\n\n## Citing hyperfine\n\nThank you for considering to cite hyperfine in your research work. Please see the information\nin the sidebar on how to properly cite hyperfine.\n\n## License\n\n`hyperfine` is dual-licensed under the terms of the MIT License and the Apache License 2.0.\n\nSee the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for details.\n","Hyperfine 是一个命令行基准测试工具，用于评估不同命令或程序的执行性能。它使用 Rust 语言编写，具备跨平台特性。该工具支持任意 shell 命令的基准测试，并提供统计分析、进度反馈、预热运行和缓存清除等功能，以确保测试结果的准确性。此外，hyperfine 还能够检测并排除异常值，支持将测试结果导出为多种格式如 CSV、JSON 等。适用于需要对软件性能进行细致比较与分析的场景，尤其是在开发过程中优化代码效率时尤为有用。",2,"2026-06-11 03:02:51","top_language"]