Performance Benchmarks
Real-world search benchmarks across multiple tools, corpora, and pattern types. ripgrep consistently leads — often by a wide margin.
Benchmarks adapted from Andrew Gallant's original benchmark blog post. Results vary by hardware, pattern, and corpus.
Linux Kernel Source Tree
Pattern: [A-Z]+_SUSPEND —
searches the full Linux kernel source (~25 million lines of code, ~900 MB).
All tools search recursively with line numbers enabled.
536 matches found by all tools.
| Tool | Time (s) | vs ripgrep |
|---|---|---|
| ripgrep fastest | 0.082 | — |
| hypergrep | 0.167 | 2.0× |
| git grep | 0.273 | 3.3× |
| ugrep | 0.301 | 3.7× |
| ag | 0.443 | 5.4× |
| grep (GNU) | 0.671 | 8.2× |
| ack | 3.231 | 39.4× |
Lower is better. Times are medians over multiple runs.
Single Large File (13.5 GB)
Pattern: Sherlock Holmes —
a simple literal search on a single 13.5 GB text file (concatenated Project Gutenberg corpus).
Tests raw throughput on a single large file.
All tools read the full file without any ignore-file filtering.
| Tool | Time (s) | vs ripgrep |
|---|---|---|
| ripgrep fastest | 6.73 | — |
| ugrep | 7.02 | — |
| grep (GNU) | 9.20 | 1.4× |
| ag (memory-maps entire file) | 34.60 | 5.1× |
Lower is better.
Methodology
Test Environment
- CPU: Intel i9-12900K @ 5.2 GHz
- RAM: 64 GB DDR5
- Storage: NVMe SSD (warm cache)
- OS: Linux (Ubuntu 22.04)
- Measurement:
hyperfine(median of 10 runs, warm cache)
Corpora
- Linux kernel: v6.6 source tree, ~75,000 files, ~900 MB
- Large file: 13.5 GB concatenated Project Gutenberg texts
- Cache: Files pre-read into OS page cache before timing
Why is ripgrep so fast?
See it yourself
Download ripgrep and run it on your own codebase.