How Do Agents Perform Code Optimization? An Empirical Study
Huiyun Peng, Antonio Zhong, Ricardo Andr\'es Calvo M\'endez, Kelechi G. Kalu, James C. Davis

TL;DR
This empirical study compares AI and human performance optimization commits, revealing that AI-generated PRs are less likely to include explicit validation but use similar optimization patterns, highlighting current strengths and limitations of AI agents.
Contribution
First empirical analysis comparing AI and human code optimization commits, providing insights into AI capabilities and gaps in real-world scenarios.
Findings
AI PRs less likely to include explicit validation (45.7% vs. 63.6%)
AI and human PRs use similar optimization patterns
Discussion of limitations and future opportunities for AI in code optimization
Abstract
Performance optimization is a critical yet challenging aspect of software development, often requiring a deep understanding of system behavior, algorithmic tradeoffs, and careful code modifications. Although recent advances in AI coding agents have accelerated code generation and bug fixing, little is known about how these agents perform on real-world performance optimization tasks. We present the first empirical study comparing agent- and human-authored performance optimization commits, analyzing 324 agent-generated and 83 human-authored PRs from the AIDev dataset across adoption, maintainability, optimization patterns, and validation practices. We find that AI-authored performance PRs are less likely to include explicit performance validation than human-authored PRs (45.7\% vs. 63.6\%, ). In addition, AI-authored PRs largely use the same optimization patterns as humans. We…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Advanced Software Engineering Methodologies · Software Engineering Research
