Below the Stopwatch: Checking the Performance Claims of Coding Agents in the Kernel
- Source
- arxiv.org
- Author
- Yuvraj Sehgal, Sneh Patel, Mahsa Panahandeh, Naser Ezzati-Jivan
- Date

Context
A pull request from a that promises faster code usually also says why, for example "cache the result" or "read the file once". Researchers at Brock University and the University of Ottawa checked whether those stated reasons hold up, not only whether the code got faster (arXiv). In a first sample of 82 agent-written performance PRs that they rebuilt and measured, 32 ran faster, 28 showed no clear change and 22 ran slower. Most claims arrived unmeasured: of 1,343 runtime-performance PRs drawn from the AIDev dataset of agent-written pull requests, 57.3% backed the claim with reasoning alone or with no evidence, and only 31.4% said how large the effect was.
The method, called Below, treats each stated reason as a prediction about what the operating system should see. Reading a file once should mean fewer read system calls, removing a lock should mean less time waiting on it, and caching should mean fewer instructions or system calls. A extracts the claimed mechanism from each PR, and the authors mapped every mechanism category to the kernel and hardware signals that must change if it is true, testing each signal beforehand on twelve pairs of small control programs. A separate build agent, Claude Code, rebuilds the code before and after each PR and writes a workload that runs the changed lines, without ever seeing the PR's description or claim. Both versions then run on dedicated cores of identical cloud machines under plain timing, hardware counters and full LTTng kernel traces, alongside a rerun of the original code against itself to measure how much the machine alone varies.
When a PR was faster, its claimed mechanism usually left the predicted trace (28 of 32 PRs); when it was slower, it rarely did (3 of 22). Many of those matches, though, rest on the instruction count, which falls for almost any speed-up: among faster PRs it dropped for 87.9% of the mechanisms they claimed and 76.7% of mechanisms they never claimed. Kernel-trace signals such as system calls, lock waits and bytes read separate the two better, 48.8% against 28.7%, about 1.7 times as often, and only 14 of the 28 matching faster PRs show their mechanism in kernel traces at all. The traces also catch claims that a stopwatch would wrongly credit. One Copilot PR to the iPhotron project said it would load assets on demand; in the authors' measurement it did cut wall time from 2.60 to 2.28 seconds, yet it made 3.49 times as many system calls and read 2.47 times the bytes. By contrast, an mlflow PR that switched artifact transfer to chunked showed exactly the predicted footprint: read calls fell to about a quarter with the same bytes read. In 42 of the 82 PRs the 's output also changed.
The authors call these shares preliminary. The sample is 82 Python PRs, up to 15 from one repository, each measured once on one machine, and an agent-written workload may never reach the conditions where a mechanism matters, such as repeated calls for a cache, which would push results toward "mechanism absent". The labels, claim extraction and workloads all come from Anthropic's Claude models, Claude Code is also one of the agents studied, and a human check of 300 PRs has not been done yet. Even so, the study shows that a timing number in an agent's PR answers whether code got faster, not why, and that the why can be checked once a workload exists. The authors' own advice is not to merge a performance PR on its description alone when its mechanism leaves no trace or its speed-up comes with changed output, and to ask agents to attach trace evidence for the mechanism they claim.
- Below separates measurement from the claim: a build agent that never sees the PR's stated reason rebuilds the code before and after, then each version is measured with timing runs, hardware counters and LTTng kernel traces.
- The abstract reports that 57.3% of 1,343 runtime-performance PRs in the AIDev dataset offer only reasoning or no evidence, and only 31.4% state an effect size.
- Of the 82 analyzed PRs, 42 also changed their program output, so a performance PR from a coding agent cannot be assumed to preserve behavior.
- Kernel signals moved about 1.7 times as often for a faster PR's claimed mechanism as for unclaimed ones, while instruction count barely separated them (1.15 times), so instruction count alone is a weak check of a claimed mechanism.
- Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
- Large language model — A model trained on large amounts of data to process and generate language.
- streaming — Sending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.
- Program — A set of instructions stored so that a computer can run it.
articleHow Do Coding Agents Optimize Software and Report Performance Validation? A Large-Scale Empirical Study of Open-Source Pull RequestsHuiyun Peng, Ricardo Calvo, Kelechi G. Kalu, James C. Davis
articleNot All Agents Are Equal: Code Quality and Post-Merge Maintenance Across Five Autonomous Coding Agents in the WildObada Kraishan
articleWhen Agent Metrics Measure Different Things: An Evidence-Grounded Audit of the Praxa AI PipelineStefan G. Creadore, Peyton Woakz