SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?
Jeffrey Jian Ma, Milad Hashemi, Amir Yazdanbakhsh, Kevin Swersky, Ofir Press, Enhui Li, Vijay Janapa Reddi, Parthasarathy Ranganathan
优化大型软件存储库的性能需要在代码推理和软件工程(SWE)方面的专业知识,以减少运行时,同时保持程序的正确性。 然而,大多数基准强调要修复什么,而不是如何修复代码。 我们引入了 SWE-fficiency,这是评估真实工作负载的存储库级性能优化的基准。 我们的套件包含9个广泛使用的数据科学,机器学习和HPC存储库(例如,numpy,pandas,scipy)的498个任务:给定完整的代码库和缓慢的工作负载,代理必须调查代码语义,本地化瓶颈和相关测试,并在通过相同单元测试时产生匹配或超过专家加速的补丁。 为了启用这种修复方法评估,我们的自动化管道抓取 GitHub 拉取对性能改进编辑的请求,将关键字过滤、静态分析、覆盖工具和执行验证相结合,以确认专家加速基线并识别相关的存储库单元测试。 对最先进的代理人的实证评估显示,业绩不佳。 平均而言,代理实现专家加速的不到0.15倍:代理在本地化优化机会,推理跨函数的执行以及保持建议编辑的正确性方面挣扎。 我们发布基准和伴随的数据管道,以促进自动化性能工程和长视软件推理的研究。
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, p...