Evaluating LLMs on Real-World Software Performance Optimization
Not on the map. Why?
Abstract (arXiv)
Software performance optimization is a notoriously complex and manual task. Despite the growing use of Large Language Models (LLMs) for code refinement, we still lack benchmarks that capture how optimization actually happens in real-world codebases. Existing frameworks often oversimplify the problem by focusing on isolated functions or a single performance metric, missing the critical trade-offs between execution time and memory footprint, the inherent noise of the measurement environment, and the variability introduced by different input data and execution conditions. We address this by introducing SWE-Pro, a repository-level benchmark derived from 102 expert-written optimizations from open-source projects. Unlike previous benchmarks, SWE-Pro pairs each task with parameterized tests to evaluate runtime, peak memory, and Time-Weighted Memory Usage (TWMU) across varying input data and execution conditions under noise-aware measurement conditions. Our evaluation shows that current LLMs struggle significantly: runtime gains are negligible, and memory optimizations are nearly non-existent. This stands in sharp contrast to expert implementations, which achieve an aggregate speedup of 15.5x and peak memory reduction of 171.3x over benchmark tasks. Expert-written improvements are observed in 91.2% of tasks for runtime and 65.7% for peak memory. Our findings expose a substantial gap between current LLM capabilities and the demands of expert-level engineering.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 12 of its 34 references that are in the map. First posted on arXiv 24 Jun 2026.
Builds on
12 of 34 references.
References · 12
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 64
- 2021Pyserini: An Easy-to-Use Python Toolkit to Support Replicable IR Research with Sparse and Dense Representationscited by 60
- 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 43
- 2025SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?cited by 36
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 35
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 27
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 24
- 2025COFFE: A Code Efficiency Benchmark for Code Generationcited by 20
- 2021The Interaction between Inputs and Configurations fed to Software Systems: an Empirical Studycited by 6
- 2026Characterizing Performance-Energy Trade-offs of Large Language Models in Multi-Request Workflowscited by 2
- 2024It's Not Easy Being Green: On the Energy Efficiency of Programming Languagescited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.
- 2026SkillEffect: Checked Lowering for Memory-Bounded Agent Toolscited by 0
- 2026Is manual software optimization a thing of the past?cited by 0
- 2026Is manual software optimization a thing of the past?29 Sep 2026
- 2026SkillEffect: Checked Lowering for Memory-Bounded Agent Tools17 Aug 2026