Parsimony 是一个开源基准,用于衡量 AI 编程模型在解决任务时净增加了多少代码,通过统计语法单元(而非行数)并对删除的代码进行扣减,以奖励更精简的代码修改。
Existing benchmarks measure solve rate and token output/cost, but don't punish excess code, which makes a codebase harder to work with in the long term. I wanted to measure this since it matters most for long-term projects.<p>Method: it takes the patches that benchmarks already publish (DeepSWE, SWE-bench Verified, SWE-bench Live) and counts "coding units": syntax elements like statements, calls, names and literals. I didn't use lines of code, so cramming code isn't rewarded. Deleted code is subtracted, so it measures net units.<p>GPT-6 and Claude 5.5 have no public patches yet, so I ran them myself on 3–10 tasks on my own subscriptions (shown as faded circles, not ranked).<p>Any feedback or model contributions are welcome, especially public patch exports for newer models.<p>GitHub: <a href="https://github.com/La5u/Parsimony" rel="nofollow">https://github.com/La5u/Parsimony</a><p>Not affiliated with any of the benchmarks.
# Parsimony: which AI coding agent changes the least code?
Source: [https://parsimony.lasu.dev/](https://parsimony.lasu.dev/)
Existing benchmarks measure solve rate and cost, but don't punish excess code, which makes a codebase harder to work with in the long term\. Parsimony measures how much code AI models add\.
It takes the patches that benchmarks already publish and counts**coding units**: syntax elements like statements, calls, comparisons, names and literals\. Lines aren't counted, so cramming code isn't rewarded, and deleted code is subtracted: net units = added − removed\.
## Compare models
Chart
X axisY axis
How to read thisModels are ranked by mean net units added on the tasks they solved, lowest first\. "Net units added \(mean\)" also includes failed attempts\. Solved comes from[SWE\-bench Verified](https://www.swebench.com/); tests aren't rerun\. Measured is how many solved attempts could be measured\.
## Leaderboard
Task
## Method
- Each patch is applied to the task's code, and both versions of every changed file are parsed\. Nothing is run\.
- Tests, docs and generated files are left out\. Only Python is measured\.
- Pass/fail comes from SWE\-bench's published results; tests aren't rerun\.
## Limits
- Smaller isn't always better: units measure size, not readability or design\.
- Models that write more code also tend to solve more tasks \(Spearman 0\.33–0\.60 on the boards with 26\+ models\)\.
- Every model uses the same agent \(mini\-SWE\-agent\), but the agent still affects how much code gets written\.
## Add your own benchmark
Have code\-size numbers from another benchmark? Download the example file, fill in your results and open it to get the same chart and table\. The file stays in your browser\.[Format and how to share it](https://github.com/La5u/Parsimony/blob/main/docs/custom-benchmarks.md)\.
Open benchmark JSON
## Example: check for a negative number
Both return the same result\.
```
def has_negative(values):
found = False
for value in values:
if value < 0:
found = True
return found
```
```
def has_negative(values):
return any(value < 0 for value in values)
```
A developer built an open-source benchmark called The Slop Index to measure how much 18 AI models produce 'AI slop', using human baselines and five dimensions including conciseness, templating, and human preference.
Karpathy released an open-source project called andrej-karpathy-skills, centered around a 4KB CLAUDE.md file containing 4 behavioral guidelines (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution). It significantly reduces AI coding error rates (up to 90%), improving code quality and development efficiency.
An open-source project uses Tree-sitter to parse code into a graph structure and store it in local SQLite, providing a code map for AI coding agents, thereby reducing token consumption and costs. On average, it saves 57% tokens and reduces costs by 25%. Supports tools like Claude Code, Cursor, aider, etc.
Semble is a fast code search library for AI agents that uses ~98% fewer tokens than grep+read, runs on CPU with no external dependencies, and integrates via MCP or CLI.