Learning Performance-Improving Code Edits
Not on the map. Why?
Abstract (arXiv)
With the decline of Moore's law, optimizing program performance has become a major focus of software research. However, high-level optimizations such as API and algorithm changes remain elusive due to the difficulty of understanding the semantics of code. Simultaneously, pretrained large language models (LLMs) have demonstrated strong capabilities at solving a wide range of programming tasks. To that end, we introduce a framework for adapting LLMs to high-level program optimization. First, we curate a dataset of performance-improving edits made by human programmers of over 77,000 competitive C++ programming submission pairs, accompanied by extensive unit tests. A major challenge is the significant variability of measuring performance on commodity hardware, which can lead to spurious "improvements." To isolate and reliably evaluate the impact of program optimizations, we design an environment based on the gem5 full system simulator, the de facto simulator used in academia and industry. Next, we propose a broad range of adaptation strategies for code optimization; for prompting, these include retrieval-based few-shot prompting and chain-of-thought, and for finetuning, these include performance-conditioned generation and synthetic data augmentation based on self-play. A combination of these techniques achieves a mean speedup of 6.86 with eight generations, higher than average optimizations from individual programmers (3.66). Using our model's fastest generations, we set a new upper limit on the fastest speedup possible for our dataset at 9.64 compared to using the fastest human submissions available (9.56).
Key facts. Cited by 103 papers in the map (data through 7 Oct 2026). Builds on 50 of its 94 references that are in the map. First posted on arXiv 15 Feb 2023.
Builds on
50 of 94 references.
References · 50
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,528
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
38 more
- 2021Towards a Unified View of Parameter-Efficient Transfer Learningcited by 863
- 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 734
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
- 2021Reframing Instructional Prompts to GPTk's Languagecited by 176
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
- 2016DeepCoder: Learning to Write Programscited by 145
- 2017RobustFill: Neural Program Learning under Noisy I/Ocited by 124
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2018Automated Algorithm Selection: Survey and Perspectivescited by 111
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 101
- 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 93
- 2016Neuro-Symbolic Program Synthesiscited by 84
- 2018Leveraging Grammar and Reinforcement Learning for Neural Program Synthesiscited by 83
- 2022Language Models Can Teach Themselves to Program Bettercited by 75
- 2023The Wisdom of Hindsight Makes Language Models Better Instruction Followerscited by 59
- 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 47
- 2019Learning to Infer Program Sketchescited by 44
- 2018Neural-Guided Deductive Search for Real-Time Program Synthesis from Examplescited by 39
- 2021An Evaluation of Edge TPU Accelerators for Convolutional Neural Networkscited by 39
- 2022InstructDial: Improving Zero and Few-shot Generalization in Dialogue through Instruction Tuningcited by 39
- 2021Data-Driven Offline Optimization For Architecting Hardware Acceleratorscited by 29
- 2017Neural Program Meta-Inductioncited by 23
- 2020Learning to Represent Programs with Property Signaturescited by 16
- 2017Souper: A Synthesizing Superoptimizercited by 12
- 2022DeepPERF: A Deep Learning-Based Approach For Improving Software Performancecited by 6
- 2022Triangulating Python Performance Issues with Scalenecited by 5
- 2021Learning to Make Compiler Optimizations More Effectivecited by 4
- 2021Learning to Superoptimize Real-world Programscited by 4
- 2022Learning to Improve Code Efficiencycited by 4
- 2022MAGPIE: Machine Automated General Performance Improvement via Evolution of Softwarecited by 1
Built on by
Citing papers per year: 2023: 19; 2024: 33; 2025: 35; 2026: 16.
103 papers.
Sort:
By area:
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2024ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolutioncited by 266
- 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
- 2024TextGrad: Automatic "Differentiation" via Textcited by 250
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2023Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generationcited by 128
38 more
- 2023Retroformer: Retrospective Large Language Agents with Policy Gradient Optimizationcited by 110
- 2024Best Practices and Lessons Learned on Synthetic Datacited by 104
- 2023BOLAA: Benchmarking and Orchestrating LLM-augmented Autonomous Agentscited by 83
- 2024A Review of Prominent Paradigms for LLM-Based Agents: Tool Use (Including RAG), Planning, and Feedback Learningcited by 74
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 55
- 2025Evaluating the Diversity and Quality of LLM Generated Contentcited by 51
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 34
- 2024Prompting Techniques for Secure Code Generation: A Systematic Investigationcited by 33
- 2023InstructCoder: Instruction Tuning Large Language Models for Code Editingcited by 28
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 28
- 2023Refactoring Programs Using Large Language Models with Few-Shot Examplescited by 27
- 2024Learning to Refine with Fine-Grained Natural Language Feedbackcited by 27
- 2024Search-Based LLMs for Code Optimizationcited by 27
- 2024DARG: Dynamic Evaluation of Large Language Models via Adaptive Reasoning Graphcited by 26
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agentscited by 24
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?cited by 24
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 23
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checkingcited by 23
- 2024CodeEditorBench: Evaluating Code Editing Capability of Large Language Modelscited by 22
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2023ChatGPT Participates in a Computer Science Examcited by 19
- 2024SwarmBrain: Embodied agent for real-time strategy game StarCraft II via large language modelscited by 18
- 2024A Systematic Assessment of OpenAI o1-Preview for Higher Order Thinking in Educationcited by 16
- 2023Supersonic: Learning to Generate Source Code Optimizations in C/C++cited by 15
- 2024EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningcited by 15
- 2025SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?cited by 15
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
- 2025SwizzlePerf: Hardware-Aware LLMs for GPU Kernel Performance Optimizationcited by 11
- 2023PerfRL: A Small Language Model Framework for Efficient Code Optimizationcited by 8
- 2024Python is Not Always the Best Choice: Embracing Multilingual Program of Thoughtscited by 8
- 2024Don't Transform the Code, Code the Transforms: Towards Precise Code Rewriting using LLMscited by 8
50 most cited of 103 All 103 (JSON)
- 2026LeanPolish: Verified Supervision for Lean Proof Compression29 Sep 2026
- 2026Is manual software optimization a thing of the past?29 Sep 2026
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026Learning from 53.6K Real-World Developer Edits of AI-Generated Code27 Jul 2026
- 2026Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation23 Jul 2026
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization22 Jul 2026
- 2026FlashRT: Agent Harness for Guiding Agents to Deploy Real-Time Multimodal Applications20 Jul 2026
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization8 Jul 2026
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolve28 May 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
38 more
- 2026CDEoH: Category-Driven Automatic Algorithm Design With Large Language Models8 Mar 2026
- 2026Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Model7 Feb 2026
- 2026MaxCode: A Max-Reward Reinforcement Learning Framework for Automated Code Optimization9 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Framework28 Dec 2025
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025CogMCTS: A Novel Cognitive-Guided Monte Carlo Tree Search Framework for Iterative Heuristic Evolution with Large Language Models9 Dec 2025
- 2025Cmprsr: Abstractive Token-Level Question-Agnostic Prompt Compressor15 Nov 2025
- 2025SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?8 Nov 2025
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization1 Nov 2025
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimization20 Oct 2025
- 2025ECO: Enhanced Code Optimization via Performance-Aware Prompting for Code-LLMs12 Oct 2025
- 2025Generating High-Quality Datasets for Code Editing via Open-Source Language Models19 Sep 2025
- 2025SwizzlePerf: Hardware-Aware LLMs for GPU Kernel Performance Optimization27 Aug 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewards24 Jul 2025
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosis22 Jul 2025
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming21 Jul 2025
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?19 Jul 2025
- 2025AblationBench: Evaluating Automated Planning of Ablations in Empirical AI Research9 Jul 2025
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving2 Jun 2025
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agents29 May 2025
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization29 May 2025
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Accelerators24 May 2025
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code19 May 2025
- 2025SuperCoder: Assembly Program Superoptimization with Large Language Models16 May 2025
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr 2025
- 2025Evaluating the Diversity and Quality of LLM Generated Content16 Apr 2025
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMs5 Apr 2025
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Models11 Mar 2025
- 2025EditLord: Learning Code Transformation Rules for Code Editing10 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking18 Feb 2025
- 2025An Interpretable Automated Mechanism Design Framework with Large Language Models16 Feb 2025
- 2025AuPair: Golden Example Pairs for Code Repair12 Feb 2025
- 2025LLM Program Optimization via Retrieval Augmented Search31 Jan 2025
- 2025Optimizing Code Runtime Performance through Context-Aware Retrieval-Augmented Generation28 Jan 2025
50 newest of 103 All 103 (JSON)
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
- 2025Evaluating the Diversity and Quality of LLM Generated Contentcited by 51
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2024DARG: Dynamic Evaluation of Large Language Models via Adaptive Reasoning Graphcited by 26
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checkingcited by 23
- 2024A Systematic Assessment of OpenAI o1-Preview for Higher Order Thinking in Educationcited by 16
- 2024Python is Not Always the Best Choice: Embracing Multilingual Program of Thoughtscited by 8
- 2025AuPair: Golden Example Pairs for Code Repaircited by 3
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Servingcited by 3
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programmingcited by 2
12 most cited of 15 All 15 (JSON)
- 2026Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation23 Jul 2026
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimization20 Oct 2025
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewards24 Jul 2025
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming21 Jul 2025
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving2 Jun 2025
- 2025Evaluating the Diversity and Quality of LLM Generated Content16 Apr 2025
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking18 Feb 2025
- 2025AuPair: Golden Example Pairs for Code Repair12 Feb 2025
- 2024A Systematic Assessment of OpenAI o1-Preview for Higher Order Thinking in Education11 Oct 2024
- 2024DARG: Dynamic Evaluation of Large Language Models via Adaptive Reasoning Graph25 Jun 2024
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?25 Mar 2024
- 2024Python is Not Always the Best Choice: Embracing Multilingual Program of Thoughts16 Feb 2024
12 newest of 15 All 15 (JSON)
- 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2023Retroformer: Retrospective Large Language Agents with Policy Gradient Optimizationcited by 110
- 2023BOLAA: Benchmarking and Orchestrating LLM-augmented Autonomous Agentscited by 83
- 2024A Review of Prominent Paradigms for LLM-Based Agents: Tool Use (Including RAG), Planning, and Feedback Learningcited by 74
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agentscited by 24
- 2024SwarmBrain: Embodied agent for real-time strategy game StarCraft II via large language modelscited by 18
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimizationcited by 4
- 2024REDO: Execution-Free Runtime Error Detection for COding Agentscited by 2
- 2025AblationBench: Evaluating Automated Planning of Ablations in Empirical AI Researchcited by 2
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2026FlashRT: Agent Harness for Guiding Agents to Deploy Real-Time Multimodal Applicationscited by 1
12 most cited of 13 All 13 (JSON)
- 2026FlashRT: Agent Harness for Guiding Agents to Deploy Real-Time Multimodal Applications20 Jul 2026
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization8 Jul 2026
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization1 Nov 2025
- 2025AblationBench: Evaluating Automated Planning of Ablations in Empirical AI Research9 Jul 2025
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agents29 May 2025
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr 2025
- 2024REDO: Execution-Free Runtime Error Detection for COding Agents10 Oct 2024
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024A Review of Prominent Paradigms for LLM-Based Agents: Tool Use (Including RAG), Planning, and Feedback Learning9 Jun 2024
- 2024SwarmBrain: Embodied agent for real-time strategy game StarCraft II via large language models31 Jan 2024
- 2023BOLAA: Benchmarking and Orchestrating LLM-augmented Autonomous Agents11 Aug 2023
12 newest of 13 All 13 (JSON)
- 2023Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generationcited by 128
- 2024Best Practices and Lessons Learned on Synthetic Datacited by 104
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2024ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolutioncited by 266
- 2024TextGrad: Automatic "Differentiation" via Textcited by 250
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 55
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 34
12 most cited of 67 All 67 (JSON)
- 2026LeanPolish: Verified Supervision for Lean Proof Compression29 Sep 2026
- 2026Is manual software optimization a thing of the past?29 Sep 2026
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026Learning from 53.6K Real-World Developer Edits of AI-Generated Code27 Jul 2026
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization22 Jul 2026
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolve28 May 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026CDEoH: Category-Driven Automatic Algorithm Design With Large Language Models8 Mar 2026
- 2026MaxCode: A Max-Reward Reinforcement Learning Framework for Automated Code Optimization9 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Framework28 Dec 2025
12 newest of 67 All 67 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMs
- 2024Performance-Aligned LLMs for Generating Fast Code
- 2026Overcoming the Weakest-Link Effect in LLM-Driven Program Optimization via Heterogeneous Edit Recombination
- 2026EvoCodeBench: A Human-Performance Benchmark for Self-Evolving LLM-Driven Coding Systems
- 2026Rethinking Code Performance Benchmarks for LLMs
- 2025Evaluating and Improving Large Language Models for Competitive Program Generation
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation
- 2025Seed-Coder: Let the Code Model Curate Data for Itself