Skip to content

v0.2.0 — native Rust search

Choose a tag to compare

@mrmps mrmps released this 06 Oct 09:40
8f7325a

Native Rust CLI: ripgrep + Potion Code static embeddings, no source index or daemon.

On 100 RepoQA Python queries, fresh-process median latency fell from 397 ms to 74 ms (5.4x); p95 fell from 834 ms to 129 ms. All 100 ranked result lists matched the Python version exactly. M5 Max / 48 GB, cached model files, filesystem caches not cleared.

Install from source with cargo install --git https://github.com/mrmps/sgrep --locked (Rust 1.90+). Remove the old pip/uv installation first. The attached macOS arm64 binary avoids compilation; ripgrep must still be on PATH. First matching search downloads about 34 MB of model files, then searches work offline.

Only macOS arm64 was exercised. The included binary passed 22 real-model CLI checks, including fresh edits, ignore rules, nested Python functions, offline operation, and closed output pipes.

Comparison on a fixed 60-query RepoQA retrieval sample: 12 repositories, six languages. Latency is a separate sequential 12-query panel on the same M5 Max.

Tool Median Correct file first Half function within 8k tokens Full function within 8k
sgrep 71 ms 53.3% 76.7% 66.7%
ripgrep 23 ms 0% 15.0% 1.7%
CK 226 ms 43.3% 76.7% 75.0%
dzhng/jevgrep + TypeSafe 10,183 ms 75.0% 60.0% 60.0%

Jevgrep has the best first-file accuracy; its Java answers often provide locations without source excerpts, which score zero on source coverage. It uses the native retrieval core, TypeSafe jev-1.13.0, default rate budgeting, no answer cache, and a resident adapter excluding CLI startup. These are complete search times, not individual model-request latency.

CK's index setup took 6m 51s and 54.7 MB, excluded from search time. CK returns complete functions more often than sgrep. Ripgrep is literal OR matching in path order, not agent-generated grep queries. These small source snapshots total 12 MB; this is a 10% sample and does not establish full-benchmark or large-monorepo performance.

Detailed report · Per-query scores · Protocol, recorded outputs and runner source