Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Software
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) can generate code, but can they generate fast code for complex, real-world software systems? In this study, we investigate this question using a dataset of 65 tasks mined from performance-critical open-source Java projects. Unlike prior studies, which focused on algorithmic puzzles, we conduct experiments on actual performance-sensitive production code and employ developer-written JMH benchmarks to rigorously validate performance gains against human baselines. Our results reveal a nuanced reality -- although LLMs demonstrate a surprisingly high capability to solve these complex engineering problems, their solutions suffer from extreme volatility and still lag behind human developers on average. Consequently, we find that the current benchmarks based on algorithmic tasks yields an overly optimistic assessment of LLM capabilities. We trace this real-world performance gap to two primary limitations: first, LLMs struggle to autonomously pinpoint performance hotspots, and second, even with explicit guidance, they often fall short of synthesizing optimal algorithmic improvements. Our results highlight the need to move beyond static code generation towards more complex agent-based systems that are able to profile and observe runtime behavior for performance improvement.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 31 of its 57 references that are in the map. First posted on arXiv 17 Oct 2025.
Builds on
31 of 57 references.
References · 31
- 2017Attention Is All You Needcited by 60,361
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2020Google Landmarks Dataset v2 -- A Large-Scale Benchmark for Instance-Level Recognition and Retrievalcited by 309
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 232
19 more
- 2023Using an LLM to Help With Code Understandingcited by 228
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 96
- 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 73
- 2024Evaluating Language Models for Efficient Code Generationcited by 73
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 64
- 2024A Performance Study of LLM-Generated Code on Leetcodecited by 49
- 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 43
- 2025Vibe coding: programming through conversation with artificial intelligencecited by 29
- 2023Refactoring Programs Using Large Language Models with Few-Shot Examplescited by 28
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 24
- 2020Sampling in Software Engineering Research: A Critical Review and Guidelinescited by 23
- 2024On Evaluating the Efficiency of Source Code Generated by LLMscited by 21
- 2025COFFE: A Code Efficiency Benchmark for Code Generationcited by 20
- 2014Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile rangecited by 17
- 2024Engineering Safety Requirements for Autonomous Driving with Large Language Modelscited by 14
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2024Beyond Correctness: Benchmarking Multi-dimensional Code Generation for Large Language Modelscited by 10
- 2024An Empirical Study on the Potential of LLMs in Automated Software Refactoringcited by 10
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
Built on by
Not cited yet.