arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2507.12415cs.SE
收藏

SWE-Perf:语言模型能否优化真实仓库中的代码性能?

SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?

Xi’an Jiaotong University(西安交通大学);TikTok(抖音(TikTok));National University of Singapore(新加坡国立大学);University of California San Diego(加州大学圣地亚哥分校)

Xinyi He, Qian Liu, Mingzhe Du, Lin Yan, Zhijie Fan, Yiming Huang, Yin Zheng, Zejian Yuan, Zejun Ma

AI总结:

提出SWE-Perf基准,用于系统评估LLM在真实仓库中的代码性能优化能力,通过140个实例评估发现现有模型与专家水平存在显著差距。

摘要:

代码性能优化在真实世界的软件工程中至关重要,对生产级系统尤为关键。虽然大型语言模型(LLM)在代码生成和错误修复方面展示了令人印象深刻的能力,但它们在仓库级别提升代码性能的熟练程度在很大程度上仍未探索。为了填补这一空白,我们引入了SWE-Perf,这是第一个专门设计用于在真实仓库上下文中系统评估LLM在代码性能优化任务上的基准。SWE-Perf包含140个精心策划的实例,每个实例都来自流行GitHub仓库中性能改进的拉取请求。每个基准实例包括相关代码库、目标函数、性能相关测试、专家编写的补丁和可执行环境。通过对涵盖文件级和仓库级方法(例如Agentless和OpenHands)的代表性方法进行全面评估,我们揭示了现有LLM与专家级优化性能之间的巨大能力差距,突显了这一新兴领域的关键研究机会。

英文摘要:

Code performance optimization is paramount in real-world software engineering and critical for production-level systems. While Large Language Models (LLMs) have demonstrated impressive capabilities in code generation and bug fixing, their proficiency in enhancing code performance at the repository level remains largely unexplored. To address this gap, we introduce SWE-Perf, the first benchmark specifically designed to systematically evaluate LLMs on code performance optimization tasks within authentic repository contexts. SWE-Perf comprises 140 carefully curated instances, each derived from performance-improving pull requests from popular GitHub repositories. Each benchmark instance includes the relevant codebase, target functions, performance-related tests, expert-authored patches, and executable environments. Through a comprehensive evaluation of representative methods that span file-level and repo-level approaches (e.g., Agentless and OpenHands), we reveal a substantial capability gap between existing LLMs and expert-level optimization performance, highlighting critical research opportunities in this emerging field.

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

↑