Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Benchmark

Lexa includes a Criterion-based benchmark suite for indexing, search, and snapshot performance.

Running the suite

Full run:

cargo bench --bench engine

Faster local smoke run:

cargo bench --bench engine -- --warm-up-time 1 --measurement-time 2 --sample-size 10

Baseline (June 3, 2026, generated Rust corpus)

BenchmarkCorpusTime
project_index/100100 files~5.7 ms
project_index/500500 files~30.8 ms
search/exact_word1,000 files~57.6 µs
search/unique_token1,000 files~192 µs
search/regex1,000 files~54.1 µs
search/rich_scoped1,000 files~92.9 µs
search/symbol_defs1,000 files~91.5 ns
search/callers1,000 files~97.9 µs
incremental_edit/single_file_reindex500 files~1.1 ms
snapshot/write500 files~6.4 ms
snapshot/load_into_engine500 files~7.6 ms