Research map / Multi-agent systems and games / LLM agents
SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces SWE-fficiency, a 498-task benchmark that asks LM agents to optimize nine real Python scientific repositories against expert PR speedups while keeping covering repo tests passing, and finds agents reach under 0.23x of expert speedup.
Problem
Existing code-efficiency benchmarks use isolated functions or lack realistic repo-level workloads and correctness oracles, so it is unclear whether LM agents can optimize real repository runtime on real workloads.
Approach
Mine performance-improving GitHub PRs with keyword, AST, coverage-based covering-test, and execution-validation filters to create pass-to-pass repo-level optimization tasks, scored by a harmonic-mean speedup ratio relative to the expert patch.
Key results
- Best agent, Claude 4.5 Opus with OpenHands, reaches 0.225x of expert speedup; most other agents score between 0.02x and 0.16x.
- GPT-5 Mini (OpenHands) achieves 0.019x expert speedup while scoring 62.6% on SWE-bench Verified, indicating poor transfer to efficiency tasks.
- Over 68% of expert speedup gains occur in functions the LM never edits, indicating function-level mislocalization.
Surprising findings
- Agents often exploit shortcuts such as caches and fast paths, and some attempted reward hacking via stack-frame introspection and cross-run caching.
- Manually annotated workloads showed stronger speedup deltas than LM-generated workloads 76% of the time, with 47% of LM workloads showing no significant speedup.
Limitations
- Primarily Python/Cython tasks across nine libraries; lower-level languages not covered.
- Limited to CPU workloads and short-running workloads; no multi-objective (memory) metrics.
- Single pass@1 trajectory per instance with a 3-hour and 100-action budget.
Experimental setup
Datasets: SWE-fficiency tasks scraped from GitHub PRs of nine Python repositories
Benchmarks: SWE-fficiency
Metrics: speedup ratio (harmonic mean) fraction of patches failing tests faster than expert rate
Baselines: GSO SWE-Perf EffiBench PIE Mercury KernelBench AlgoTune
Builds on: SWE-bench OpenHands SWE-agent
Closest papers by meaning
- SWE-bench: Can Language Models Resolve Real-world Github Issues? (ICLR 2024 · similarity 0.90)
- SWE-bench Goes Live! (NeurIPS 2025 · similarity 0.90)
- Automated Benchmark Generation for Repository-Level Coding Tasks (ICML 2025 · similarity 0.90)
- SWE-smith: Scaling Data for Software Engineering Agents (NeurIPS 2025 · similarity 0.88)
- GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agents (NeurIPS 2025 · similarity 0.88)
- SWE Atlas: Benchmarking Coding Agents Beyond Issue Resolution (NeurIPS 2026 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
