Optimizing the performance of large-scale software repositories demands expertise in code reasoning and software engineering (SWE) to reduce runtime while preserving program correctness. However, most benchmarks emphasize what to fix rather than how to fix code. We introduce SWE-fficiency, a benchmark for evaluating repository-level performance optimization on real workloads. Our suite contains 498 tasks across nine widely used data-science, machine-learning, and HPC repositories (e.g., numpy, pandas, scipy): given a complete codebase and a slow workload, an agent must investigate code semantics, localize bottlenecks and relevant tests, and produce a patch that matches or exceeds expert speedup while passing the same unit tests. To enable this how-to-fix evaluation, our automated pipeline scrapes GitHub pull requests for performance-improving edits, combining keyword filtering, static analysis, coverage tooling, and execution validation to both confirm expert speedup baselines and identify relevant repository unit tests. Empirical evaluation of state-of-the-art agents reveals significant underperformance. On average, agents achieve less than 0.15x the expert speedup: agents struggle in localizing optimization opportunities, reasoning about execution across functions, and maintaining correctness in proposed edits. We release the benchmark and accompanying data pipeline to facilitate research on automated performance engineering and long-horizon software reasoning.


翻译:优化大规模软件仓库的性能需要代码推理与软件工程(SWE)的专业知识,以在保持程序正确性的同时降低运行时开销。然而,现有基准大多关注“修复什么”而非“如何修复代码”。本文提出SWE-fficiency——一个针对真实工作负载下仓库级性能优化的评估基准。该套件涵盖九个广泛使用的数据科学、机器学习及高性能计算仓库(如numpy、pandas、scipy)中的498项任务:给定完整代码库与低效工作负载,智能体需探究代码语义、定位性能瓶颈及相关测试,并生成在通过相同单元测试的同时达到或超越专家级加速效果的补丁。为实现这种“如何修复”的评估,我们构建了自动化流水线:通过关键词过滤、静态分析、覆盖度工具与执行验证,从GitHub拉取请求中提取性能优化编辑,既确认专家加速基线,又识别相关仓库单元测试。对前沿智能体的实证评估显示出显著性能差距:平均而言,智能体仅达到专家加速效果的0.15倍以下。智能体在定位优化机会、跨函数执行推理以及保持修改正确性方面存在明显不足。我们公开此基准及配套数据流水线,以推动自动化性能工程与长周期软件推理领域的研究。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
ICLR'21 | GNN联邦学习的新基准
图与推荐
12+阅读 · 2021年11月15日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
RNN | RNN实践指南(2)
KingsGarden
19+阅读 · 2017年5月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
Arxiv
0+阅读 · 12月15日
Arxiv
0+阅读 · 11月18日
VIP会员
相关资讯
ICLR'21 | GNN联邦学习的新基准
图与推荐
12+阅读 · 2021年11月15日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
RNN | RNN实践指南(2)
KingsGarden
19+阅读 · 2017年5月4日
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员