Skip to content

Benchmarks

All numbers are reproducible from the repo (bench/run.mjs, bench/vs-codegraph.mjs, bench/accuracy.mjs) and were measured on an Apple Silicon laptop against codegraph (~35k★), the leading local codebase-graph MCP, which shares codescope’s architecture (tree-sitter → SQLite + FTS5 → MCP). Both tools ran on the same repos.

codescope’s own numbers across four repos of increasing size:

repofilessymbolsfull indexincremental (per save)nav token reduction
codescope33202121 ms2.0 ms64%
mcp-ts-sdk2641,958572 ms0.54 ms74%
phoenix3,51120,1432.1 s0.82 ms80%
trigger.dev2,49033,7861.8 s0.74 ms99%

Re-indexing one changed file costs ~0.5–0.8 ms (280–1,200× cheaper than a full re-index), so the watch-first graph stays current on every save. Queries are sub-millisecond. Token reduction is vs an agent reading the whole file to answer “where is X and what calls it.”

axisrepocodegraphcodescopewinner
full index (CLI wall)mcp-ts-sdk (264 f)2,335 ms670 mscodescope 3.5×
phoenix (3,500 f)20,010 ms2,639 mscodescope 7.6×
index size on diskmcp-ts-sdk8.2 MB2.5 MBcodescope 3.3×
phoenix112.8 MB22.8 MBcodescope 5.0×
tokens / definition answermcp-ts-sdk187145codescope
phoenix215183codescope
tokens / callers answermcp-ts-sdk12298codescope
phoenix177145codescope

Indexing is faster because parsing is fanned across a worker-thread pool; the index is smaller because codescope stores a leaner node set; answers are shorter because the output is built for an agent to read, not a human to skim.

Accuracy — “did it return the right answer?”

Section titled “Accuracy — “did it return the right answer?””

The axis that matters most for an agent. Ground truth comes from each language’s own native analysis engine — the TypeScript compiler, Jedi for Python, go/types for Go — not from codescope. For each definition we compute the true set of files containing a call to it, then score each tool’s callers answer.

languageoraclerepocodescope F1codegraph F1
TypeScripttscMCP SDK core / client / server0.95 / 0.92 / 0.960.66 / 0.70 / 0.91
TypeScripttscgot · zustand0.97 · 0.990.75 · 0.87
PythonJedirequests0.7880.454
Gogo/typesgin0.7200.646

codescope wins caller accuracy on every language and repo tested. It rarely misses a true caller (high recall) where codegraph misses 13–48%, with matching or better precision. Go is the hardest case — gin reuses method names across many types (Use, Next, Handle), so both tools have ~0.6 precision there without receiver-type resolution; codescope still wins net. Type-aware method resolution is the roadmap item that would lift precision further.

codegraph isn’t the only peer. codescope was also benchmarked against other runnable open-source tools (each run locally, same harness):

  • code-graph-mcp (@sdsrs/code-graph, Rust, 16 languages + semantic search): codescope is 2–4× smaller and faster to index on all five fresh repos, and more accurate on callers — Python F1 0.788 vs 0.217, Go 0.720 vs 0.651.
  • code-review-graph (Python, + community detection / wikis): building requests took 5.98 s / 6.1 MB vs codescope’s ~0.3 s / ~0.7 MB (≈20× faster, ≈9× smaller). Its query interface is MCP-only, so caller accuracy wasn’t measured.
  • CodeGraphContext stores its graph in Neo4j (needs a running server) — not measured here.

Against every competitor benchmarked, codescope is the leanest, fastest, and most call-graph-accurate — though those tools offer features codescope doesn’t (semantic/vector search, community detection, Cypher over Neo4j). codescope’s bet is “small, fast, accurate call graph.”

To check nothing is tuned to one repo, the head-to-head ran on five fresh, unrelated codebases across languages — including Gin, one of codegraph’s own published benchmark repos (anti-cherry-pick):

repolangindex sizetokens/deftokens/callers
ginGocs 1.6 vs 5.6 MBcg 109 vs 97cs 76 vs 103
requestsPythoncs 0.7 vs 2.4 MBcs 126 vs 172cs 59 vs 74
zustandTScs 0.5 vs 1.0 MBtie 81 vs 80cg 29 vs 20
gotTScs 1.0 vs 3.2 MBcs 90 vs 96tie 53 vs 52
ripgrepRustcs 2.0 vs 9.1 MBcs 150 vs 167cs 81 vs 154

Index size: codescope wins 5/5 (3–4× smaller). Tokens: wins most, ties/loses a few — competitive, not universally ahead. The variance is the point: nothing is hand-tuned to one codebase. (Accuracy generalization is the multi-language table above, scored against each language’s native compiler/analyzer.)

  • The codegraph comparison is single-run on one machine. The two tools count graph nodes differently, so index time and size are informative but not a pure apples-to-apples ratio.
  • Token reductions elsewhere in the docs (vs reading whole files) are a model of agent behaviour, not a captured agent trace.
  • codescope’s precision ceiling (collisions between same-named symbols) would need type-aware resolution to reach 1.00 — a roadmap item. As measured today, codescope is the more accurate of the two.
  • What codegraph still leads on: a few extra node kinds (constants, properties, routes), broader agent auto-install, and — above all — maturity and a real user base. codescope is the leaner, faster, more accurate newcomer.