What ast-grep says, vs. what it scored.
Tree-sitter AST pattern matcher for structural search-and-rewrite -- precise if you already know the exact shape of the code you want.
“ast-grep can precisely search code based on AST, running through ten thousand files in sub seconds.”
| Tool | MRR | p95 | p100 |
|---|---|---|---|
| ★ Atelier +semantic (BGE) | 0.727 | 390ms | 1057ms |
| ★ Atelier lexical (default) | 0.676 | 134ms | 319ms |
| ast-grep | 0.312 | 1255ms | 8806ms |
"Sub seconds through ten thousand files" is a fair speed claim for literal AST-pattern matching -- ast-grep even publishes a tool-comparison page, but it's feature checkboxes against Semgrep/GritQL/Comby, not a quantitative accuracy number. It needs an exact structural pattern, so on natural-language "where does X happen" queries it lands 0.312 MRR -- behind plain ripgrep.
The true story
Every tool in this comparison, ast-grep included, has been through the exact same 14 repositories and 7,213 query/gold pairs that score Atelier — no cherry-picked queries, no separate corpus. Full methodology, every raw number, and the other 9 tools →