Search Benchmarks

May 28, 2026 ยท View on GitHub

With search_index: true, AFT builds a trigram index in the background and serves grep queries from memory. Here's how it compares to ripgrep on real codebases.

opencode-aft (253 files)

QueryripgrepAFTSpeedup
validate_path31.4ms1.48ms21x
BinaryBridge31.0ms1.3ms24x
fn handle_grep31.3ms0.2ms136x
search_index31.5ms0.4ms71x

reth (1,878 Rust files)

QueryripgrepAFTSpeedup
impl Display for98.9ms1.10ms90x
BlockNumber61.6ms2.19ms28x
EthApiError32.7ms1.31ms25x
fn execute36.6ms2.19ms17x

Chromium/base (3,953 C++ files)

QueryripgrepAFTSpeedup
WebContents69.5ms0.29ms236x
StringPiece51.8ms0.78ms66x
NOTREACHED51.6ms2.16ms24x
base::Value54.4ms1.13ms48x

Rare queries see the biggest gains โ€” the trigram index narrows candidates to a few files instantly. High-match queries still benefit from memchr SIMD scanning and early termination.

Index builds in ~2s for most projects (under 2K files). Larger codebases like Chromium/base (~4K files) take ~2 minutes for the initial build. Once built, the index persists to disk for instant cold starts and stays fresh via file watcher and mtime verification.