Skip to content

Instantly share code, notes, and snippets.

@0atman
Last active September 5, 2025 13:05
Show Gist options
  • Select an option

  • Save 0atman/a8db19899d4f66db15234601bf81365d to your computer and use it in GitHub Desktop.

Select an option

Save 0atman/a8db19899d4f66db15234601bf81365d to your computer and use it in GitHub Desktop.
My standard 'install a specific ripgrep' benchmark, now with hyperfine and zero install with nix

With Rust and Hyperfine installed natively

(through https://rustup.rs)

hyperfine --warmup=1 'cargo install -f [email protected]'

Without installation on any machine with Nix

nix-shell -p cargo hyperfine --run "hyperfine --warmup=1 'cargo install -f [email protected]'"

Without hyperfine

This won't be quite as comparable, hyperfine is really great for benchmarking, but if you only have cargo, just run the install twice:

cargo install -f [email protected] && cargo install -f [email protected]
@0atman
Copy link
Author

0atman commented Sep 3, 2025

Framework 12 - 21s

Intel i3 base version, 16GB memory

Benchmark 1: cargo install -f ripgrep@14.1.0
  Time (mean ± σ):     22.313 s ±  0.533 s    [User: 141.531 s, System: 5.313 s]
  Range (min … max):   21.104 s … 23.221 s    10 runs

Note: 10s slower using 8GB of memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment