arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.21757cs.SEcs.AI
收藏

代理如何执行代码优化?一项实证研究

How Do Agents Perform Code Optimization? An Empirical Study

Purdue University(普渡大学)

Huiyun Peng, Antonio Zhong, Ricardo Andrés Calvo Méndez, Kelechi G. Kalu, James C. Davis

AI总结:

本文通过实证研究比较了AI和人类在性能优化提交中的表现,发现AI提交在性能验证方面较人类不足,但优化模式与人类相似。

摘要:

性能优化是软件开发中的关键但具有挑战性的一部分,通常需要深入了解系统行为、算法权衡和仔细的代码修改。尽管最近在AI编码代理方面取得了进展,加速了代码生成和bug修复,但对这些代理在现实世界性能优化任务上的表现了解甚少。我们提出了首次实证研究,比较代理和人类撰写的性能优化提交,分析了来自AIDev数据集的324个代理生成和83个人类生成的PR,在采用率、可维护性、优化模式和验证实践方面。我们发现,AI撰写的性能PR中包含显式性能验证的比例低于人类撰写的PR(45.7% vs. 63.6%,p=0.007)。此外,AI撰写的PR在优化模式上与人类使用相同。我们进一步讨论了推进代理代码优化的局限性和机会。

英文摘要:

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\%, $p=0.007$). In addition, AI-authored PRs largely use the same optimization patterns as humans. We further discuss limitations and opportunities for advancing agentic code optimization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑