# Benchmarks

The headline measurements with their samples, the scale table with lines of code, where other tools lead, and where the full methodology and raw runs live.

Every number here is measured on public repositories at pinned commits,
against answer keys we did not write. The full page, with methods,
samples, statistical tests and every row we ran, is
[repowise.dev/benchmarks](https://repowise.dev/benchmarks). The
methodology of record, with every number on this page, is
[docs/BENCHMARKS.md](https://github.com/repowise-dev/repowise/blob/main/docs/BENCHMARKS.md)
in the open-source repository.

## At a glance

| Claim | Number | Sample |
|---|---|---|
| Call graph checked by each language's compiler (jedi for Python) | **93.8% to 99.8%** of drawn calls confirmed on Go, TypeScript, Dart, C and Python; Java **0.898 to 1.000**; Kotlin, C#, C++ and Rust **0.780 to 0.975** | 32 repositories, 10 languages, recall beside every figure |
| Call graph against four other tools (Go, TypeScript) | No tool that finds as much of the graph gets more of it right, in **7 of 7** cells | 37,853 compiler edges, 5 tools |
| Finding the right files | **0.876** of the needed files found, against **0.610** for the next tool | 42 sealed instances, p = 0.00004 |
| Work saved in an agent loop | **Up to 99% fewer files opened** (3.28 to 0.00), up to 51% less output, up to 47% faster, **71 of 72** answers right (Sonnet 4.6); fewer files on every model; **48 of 48** answers right on Opus 5.5 ([results](https://repowise.dev/benchmarks#agent-loop-per-model), [raw data](https://github.com/repowise-dev/repowise-bench/tree/master/results/per_model_2026_11)) | 24 questions on three repos newer than every model's training, Claude Code |
| Work saved against other context tools | **31.6% less** agent output than no tool, 3.8 tool calls against 7.2 | 43 django questions on Codex, p < 0.0001 |
| Work saved on large codebases (CodeScaleBench) | **53% fewer input tokens**, 42% fewer file reads, 2.5 shell searches against 27.9, **33% lower cost**, accuracy non-inferior (+0.027) | 9 heavy understand tasks, Haiku 4.5 in Claude Code, docs + semantic search |
| Health score against CodeScene | **2.3x** the later-defective files inside a 20% review budget | 2,770 files, 21 repositories, p = 0.003 |
| Which tests cover a file, with no coverage run | **95.7%** precision on what reaches a file, **97.5%** on the tests to run | 46 claims and 47 targets, checked against per-test coverage |
| Largest repository indexed | **About 15M lines of code, 58,924 files** (dotnet/runtime) in 120 minutes at 11.7 GiB peak | one keyless run on a laptop |
| Memory to build the call graph | **75 MB** median against 757 MB for CodeGraph, lowest on **35 of 35** repositories | 35 repositories, 5 tools |

## CodeScaleBench understand tasks

[CodeScaleBench](https://github.com/sourcegraph/CodeScaleBench)'s
"understand" tasks ask an agent to explain real, large codebases: how
PostgreSQL executes a query, how Envoy routes a request, how a Kubernetes
CRD moves through its lifecycle. The task's own checks grade every answer.
Claude Code with Haiku 4.5, 2 trials per task per arm, paired per task,
against our own run of the benchmark's baseline config.

| Per task, 9 heavy tasks | Without repowise | Repowise, keyless | Repowise, docs + semantic search | Docs + semantic vs without |
|---|---:|---:|---:|---:|
| Input tokens incl. cache | 2.12M | 1.06M | **1.00M** | **-53%** |
| Read calls | 20.7 | 15.5 | **12.0** | **-42%** |
| Distinct files read | 16.2 | 12.3 | **9.9** | **-39%** |
| Shell searches (grep, find, ls) | 27.9 | 3.9 | **2.5** | **-91%** |
| Turns | 51.3 | 36.0 | **33.4** | **-35%** |
| Output tokens | 15.4k | 12.3k | **11.7k** | **-24%** |
| Cost (API-equivalent) | $0.408 | $0.274 | **$0.272** | **-33%** |
| Accuracy, grader-fixed | 0.803 | 0.882 | 0.830 | **+0.027** |

Against no repowise, cost and input tokens are lower on all 9 tasks, and
accuracy is non-inferior at a -0.05 margin set before the run (+0.027,
95% CI [-0.028, +0.082]).

Across all 31 understand tasks we ran, a keyless index (`repowise init
--no-prose`) cut shell searches **71%** (lower on 29 of 31 tasks), Read
calls 21%, input tokens 20% and cost 10% pooled (17% on the median task),
with accuracy level (-0.010, 95% CI [-0.068, +0.049]).

How it was run:

- Repowise arms keep the full local source and add the `.claude/CLAUDE.md`
  that `repowise init` writes, plus a preamble saying to call repowise
  tools first. The benchmark's published Sourcegraph arm also carries a
  must-use preamble and removes the local source, so the two are different
  experiments.
- The docs arm adds documentation from `repowise generate` and semantic
  search. Semantic search also runs with no key and no service:
  [Local semantic search](https://docs.repowise.dev/installation/config-reference#local-semantic-search).
- Each index is built once per commit and reused by every session: $0.008
  to $0.62 per repository keyless, $0.23 to $1.37 with docs and semantic
  search.
- Grader fixes, the 9-task selection, docs against keyless and every
  per-task row:
  [docs/BENCHMARKS.md](https://github.com/repowise-dev/repowise/blob/main/docs/BENCHMARKS.md#codescalebench-understand-tasks).

## Scale

Large public repositories, indexed end to end on one Windows laptop
(31 GB RAM), keyless (`repowise init --no-prose`), limited to 8 CPUs and
2 parse workers. October 2026.

| Repository | Tracked files | Lines of code | First index | Peak memory | Index on disk |
|---|---:|---:|---:|---:|---:|
| dotnet/aspnetcore v8.0.31 | 15,510 | 1.5M | 20 min | 4.0 GiB | 1.4 GiB |
| elastic/elasticsearch v8.19.22 | 34,315 | 4.0M | 52 min | 7.8 GiB | 4.2 GiB |
| dotnet/runtime v8.0.31 | **58,924** | **15.0M** | **120 min** | **11.7 GiB** | 7.7 GiB |

Lines of code are non-blank lines in tracked source files (C#, IL, C,
C++, Java, TypeScript, JavaScript, Python, shell, assembly and similar),
with data, markup and docs left out. Peak memory is the whole process
tree, one run per repository.

The first index is a one-time cost: it builds the call graph, git
history, health, tests, dead code and docs together. After that, each
update re-analyses only what changed. On aspnetcore, an update with no
changes takes about 4 seconds.

## Where another tool leads

- **Full index time.** A full repowise index builds the call graph (about
  3 seconds on django), git history, a search index, decisions and health
  in one pass; CodeGraph builds a call graph alone 22x sooner. Updates
  after the first index are incremental.
- **Recall on four Go cells.** Repowise leads recall on both TypeScript
  cells and on gitleaks without tests; on the other Go cells, tools with
  lower precision draw a larger graph.
- **Shortlist length.** CodeScene flags about 27 files where repowise
  flags 132, a shorter list at the same review budget, while repowise
  finds 2.3x the later-defective files in it.

## What is measured, and what is not

| Layer | Measured against |
|---|---|
| Call-graph accuracy | each language's compiler toolchain, and four other tools on Go and TypeScript |
| Finding the right files | CodeGraph, Graphify, code-review-graph |
| Work saved in a real agent loop | CodeGraph, Serena, Graphify, code-review-graph, and a bare agent |
| Work saved on large codebases | CodeScaleBench's graded tasks, against the benchmark's baseline config |
| Code health and defect prediction | CodeScene |
| Test intelligence | per-test coverage on this repository |
| Indexing time and memory | CodeGraph, Graphify, code-review-graph |
| Command-output compression | no comparable tool in the field |

Documentation generation and PR review are capability comparisons, not
measurements, and they live in the
[README's feature table](https://github.com/repowise-dev/repowise#how-it-compares-on-capability).

A figure that measures one context payload is not an agent-session
result, and "no significant difference" is not parity. The full page
keeps those distinctions, and quotes no figure without its sample.

## Reproducing any of it

The harnesses, the pre-registration files with their commit timestamps,
the arm-parity rules, the statistical tests, and every raw run including
the invalidated ones with their invalidation notes are in
[repowise-bench](https://github.com/repowise-dev/repowise-bench). Nothing
is measured on a private corpus.

## Next

- [Code health](https://docs.repowise.dev/intelligence/code-health) explains how the score the defect study evaluates is computed.
- [MCP tools](https://docs.repowise.dev/mcp/overview) lists the tools the agent-loop study measures.
- [`repowise distill`](https://docs.repowise.dev/cli/distill) is the subject of the compression study.
