TensorX
返回文献探索

Paper · arXiv 2507.12415

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

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

43 upvotesJuly 16, 2025arXiv 预印本
AI 摘要

SWE-Perf is a benchmark for evaluating LLMs in code performance optimization using real-world repository data, revealing significant gaps compared to expert performance.

Large Language ModelsLLMscode performance optimizationbenchmarkperformance-improving pull requestscodebasetarget functionsperformance-related testsexpert-authored patchesexecutable environmentsAgentlessOpenHands

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories? | TensorX