Other benchmarks · measured on the reference machine

Everything else
an agent waits on.

A coding agent spends time on more than tokens. It also waits for searches, builds and tests to run. This page holds benchmarks of those tools, measured on the DGX Spark that serves the LLM rankings. Each entry links to its raw numbers and a script you can rerun.

Code search · 2026-10-12 · DGX Spark

grep vs ripgrep vs ugrep.

Agents search code all the time, and harnesses use different tools for it. In Claude Code 2.1.296 on this machine, the shell's grep is a function that runs the ugrep built into the Claude Code binary, not GNU grep. ripgrep is the de facto fast code-search tool; VS Code's search runs on it. This benchmark measures all of them on the corpus ripgrep's own benchmarks use: the Linux kernel source.

GNU grep 3.11
baseline · single-threaded

The standard Unix grep from the Ubuntu package. Recursive search with -r runs on one thread, and case-insensitive search is slow under a UTF-8 locale.

ripgrep 14.1.0
Rust · parallel · respects .gitignore

Andrew Gallant's line-oriented search tool, built on Rust's regex engine. It searches directories in parallel and skips gitignored, hidden and binary files by default.

ugrep 7.8.5 · 7.8.4
C++ · parallel · grep-compatible

Robert van Engelen's grep-compatible search tool. 7.8.5 was built from the upstream tag. 7.8.4 is the copy built into Claude Code, which the shell's grep runs.

Results · median seconds · lower is faster

ripgrep leads. ugrep is close behind.

Across the whole 1.8 GB kernel tree, ripgrep is 11–20× faster than GNU grep and ugrep is 8–16× faster. In a single 1.4 GB file, ripgrep is 4.8–7.0× faster than GNU grep and ugrep is 3.1–6.4× faster. Every tool returned the same number of matches in every row. Green marks the fastest time in each row.

Search GNU grep ripgrep rg -j1 ugrep ugrep -J1 ugrep · Claude Code Matches
tree · literal PM_RESUME1.1880.0970.6360.1320.6120.12938
tree · case-insensitive -i2.0820.1030.7050.1340.6280.131697
tree · word regex -w [A-Z]+_SUSPEND1.1530.0960.6310.1320.6000.129577
tree · 4-way alternation1.8200.1030.7240.1410.7340.137181
tree · no match1.0070.0940.6210.1310.5870.1280
file · literal PM_RESUME0.8610.164—0.236—0.23129
file · case-insensitive -i1.6940.241—0.263—0.246672
file · regex \w+_init\(0.8870.183—0.250—0.25687,033
file · no match0.6810.119—0.217—0.2170
startup · tiny file0.0020.003—0.003—0.0040

tree is the Linux kernel at d6d3455d8: 96,080 files, 1.8 GB. file is every *.c and *.h joined into one file: 1.45 GB, 37.7 M lines. -j1 / -J1 limit a tool to one thread. A single file is searched on one thread anyway, so those cells are empty.

The lead comes from cores
tree · 20 threads

GNU grep searches the tree on one thread. Limited to one thread, ripgrep is only 1.6–3.0× faster than grep. Most of its 11–20× lead comes from searching on all 20 threads.

ugrep's engine keeps up
single thread · tree

On one thread, ugrep matches or slightly beats ripgrep (0.59–0.73 s vs 0.62–0.72 s). On all cores, ripgrep's parallel directory walk scales better, which gives it a lead of about 1.35×.

Claude Code's grep is fast
embedded ugrep 7.8.4

The ugrep built into Claude Code runs within noise of the standalone build, with startup of 4 ms vs 3 ms. Typing grep there gives near-ripgrep speed, not GNU grep speed.

Method & references

How it was measured.

Each command ran once as a warmup, then 7 timed runs. The table shows the median. The page cache was warm, and the corpus fits in RAM. Output went to wc -l, not /dev/null, because GNU grep stops at the first match when writing to /dev/null. grep and ugrep ran with -rnI --exclude-dir=.git to match ripgrep's defaults, so all three searched the same files. In ripgrep, -E means --encoding, so regex cases pass the pattern to ripgrep without it. Machine: NVIDIA DGX Spark, Cortex-X925 + A725 with 20 threads, Ubuntu 24.04 aarch64, LANG=en_US.utf8. These are single-machine numbers, so treat gaps under about 5% as noise.

tool · MIT / Unlicense

Source, docs and the benchsuite this method is based on. The tool was introduced in “ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}”.

tool · BSD-3-Clause

Source and the release built for this benchmark, v7.8.5. The project publishes its own ugrep-benchmarks.

results/2026-10-12-grep-ripgrep-ugrep

results.tsv holds every median and match count, run.py reruns the benchmark, and the README lists exact versions and the kernel commit. GNU grep: gnu.org/software/grep.