SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ma, Jeffrey Jian, Hashemi, Milad, Yazdanbakhsh, Amir, Swersky, Kevin, Press, Ofir, Li, Enhui, Reddi, Vijay Janapa, Ranganathan, Parthasarathy
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908643559997440
author Ma, Jeffrey Jian
Hashemi, Milad
Yazdanbakhsh, Amir
Swersky, Kevin
Press, Ofir
Li, Enhui
Reddi, Vijay Janapa
Ranganathan, Parthasarathy
author_facet Ma, Jeffrey Jian
Hashemi, Milad
Yazdanbakhsh, Amir
Swersky, Kevin
Press, Ofir
Li, Enhui
Reddi, Vijay Janapa
Ranganathan, Parthasarathy
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2511_06090
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?
Ma, Jeffrey Jian
Hashemi, Milad
Yazdanbakhsh, Amir
Swersky, Kevin
Press, Ofir
Li, Enhui
Reddi, Vijay Janapa
Ranganathan, Parthasarathy
Software Engineering
Artificial Intelligence
Performance
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.
title SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?
topic Software Engineering
Artificial Intelligence
Performance
url https://arxiv.org/abs/2511.06090