← All comparisons
LemonCrow vs ast-grep
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.
What ast-grep says about itself
“ast-grep can precisely search code based on AST, running through ten thousand files in sub seconds.”
What it actually scored — same 14 repos, same 7,213 queries as every other tool
| Tool | MRR | p95 | p100 |
|---|---|---|---|
| ★ LemonCrow +semantic (BGE) | 0.727 | 390ms | 1057ms |
| ★ LemonCrow lexical (default) | 0.676 | 134ms | 319ms |
| ast-grep | 0.312 | 1255ms | 8806ms |
Speed claim fair for exact AST-pattern matching. LemonCrow uses ast-grep directly (security scanner, edit-impact detection). Exact-pattern only, no free-text: 0.312 MRR vs. LemonCrow's 0.727.
By query kind -- same benchmark, broken out (no reps in this eval: one deterministic pass per query)
| Kind | LemonCrow +semantic | LemonCrow lexical | ast-grep |
|---|---|---|---|
| definition | 0.873 (n=1570) | 0.871 (n=1570) | 0.555(n=1570) |
| content | 0.873 (n=1444) | 0.864 (n=1444) | 0.591(n=1444) |
| semantic | 0.759 (n=1800) | 0.576 (n=1800) | 0.000(n=1800) |
| swebench | 0.500 (n=1908) | 0.493 (n=1908) | 0.230(n=1908) |
| sessions | 0.587 (n=491) | 0.571 (n=491) | 0.179(n=491) |
n = query/gold pairs of that kind, out of 7,213 total -- every provider scored on all 5 kinds.
By repo -- all 15 repos in the corpus, same query set
| Repo | LemonCrow +semantic | LemonCrow lexical | ast-grep |
|---|---|---|---|
| astropy/astropy | 0.772 | 0.715 | 0.448 |
| atelier-ws/atelier-dev | 0.467 | 0.477 | 0.205 |
| atelier/atelier | 0.594 | 0.557 | 0.230 |
| django/django | 0.689 | 0.652 | 0.223 |
| matplotlib/matplotlib | 0.801 | 0.747 | 0.000 |
| mwaskom/seaborn | 0.814 | 0.768 | 0.445 |
| pallets/flask | 0.735 | 0.671 | 0.323 |
| psf/requests | 0.840 | 0.803 | 0.486 |
| pydata/xarray | 0.815 | 0.764 | 0.448 |
| pylint-dev/pylint | 0.856 | 0.784 | 0.452 |
| pytest-dev/pytest | 0.826 | 0.739 | 0.455 |
| scikit-learn/scikit-learn | 0.740 | 0.669 | 0.330 |
| sphinx-doc/sphinx | 0.637 | 0.580 | 0.299 |
| sympy/sympy | 0.694 | 0.637 | 0.373 |
| torvalds/linux | 0.726 | 0.668 | 0.107 |
MRR per repo: n-weighted blend across all 5 query kinds, same 7,213-query run.
The true story
Same 14 repositories, same 7,213 query/gold pairs as every tool here, ast-grep included. Full methodology, every raw number, and the other 9 tools →