PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) are widely adopted for assisting in software development tasks, yet their performance evaluations have narrowly focused on the functional correctness of generated code. Human programmers, however, require LLM-generated code to be not only correct but also optimally efficient. We propose PerfCodeGen, a training-free framework that enhances the performance of LLM-generated code by incorporating feedback based on runtime during test case execution into the self-refinement iterations. With PerfCodeGen, we achieve speedups for a significantly higher proportion of problems compared to using the base LLM with sophisticated prompting techniques. Applied to open language models like Phi-3-mini, PerfCodeGen achieves runtime efficiency comparable to prompting powerful closed models like GPT-4. We achieve state-of-the-art runtime efficiency on benchmarks such as HumanEval, MBPP, and APPS, frequently surpassing the ground truth reference solutions with PerfCodeGen using GPT-3.5 and GPT-4. Additionally, we demonstrate the effectiveness of our approach in enhancing code quality across a range of open LLMs of varying sizes including Phi-3-mini, Llama 3 8B, Mixtral 8x7B, Command R, and Llama 3 70B.
Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Builds on 55 of its 68 references that are in the map. First posted on arXiv 18 Nov 2024.
Builds on
55 of 68 references.
References · 55
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2020Learning to summarize from human feedbackcited by 2,562
38 more
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
- 2024Mixtral of Expertscited by 1,785
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preferencecited by 1,151
- 2023Towards Understanding Sycophancy in Language Modelscited by 988
- 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 965
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
- 2023ChatDev: Communicative Agents for Software Developmentcited by 893
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
- 2023Open Problems and Fundamental Limitations of Reinforcement Learning from Human Feedbackcited by 743
- 2023Cognitive Architectures for Language Agentscited by 422
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2022Generating Sequences by Learning to Self-Correctcited by 271
- 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
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
- 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 130
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2023Learning Performance-Improving Code Editscited by 103
- 2023Is RLHF More Difficult than Standard RL?cited by 96
- 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 81
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 74
- 2023Are You Sure? Challenging LLMs Leads to Performance Drops in The FlipFlop Experimentcited by 71
- 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
- 2023LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluationscited by 58
- 2024The Larger the Better? Improved LLM Code-Generation via Budget Reallocationcited by 41
- 2023Prompting Is All You Need: Automated Android Bug Replay with Large Language Modelscited by 40
50 most cited of 55 All 55 (JSON)
Built on by
Citing papers per year: 2025: 10; 2026: 12.
22 papers.
Sort:
By area:
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
- 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Taskscited by 20
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
- 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 8
- 2025Reliable Proof Generation with LLMs via Analogical Retrieval and Symbolic Verification: A Case Study in Euclidean Geometrycited by 7
- 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
- 2026Self-Execution Simulation Improves Coding Modelscited by 2
- 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
- 2025GUISpector: An MLLM Agent Framework for Automated Verification of Natural Language Requirements in GUI Prototypescited by 1
- 2025How Do Agentic AI Systems Address Performance Optimizations? A BERTopic-Based Analysis of Pull Requestscited by 1
- 2026A-ProS: Towards Reliable Autonomous Programming Through Multi-Model Feedbackcited by 1
10 more
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translationcited by 0
- 2026SemRep: Generative Code Representation Learning with Code Transformationscited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debuggingcited by 0
- 2026Strategies for Guiding LLMs to Use Software Design Patterns: A Case of Singletoncited by 0
- 2026STAB: Specification-driven Testing for Algorithmic Bottleneckscited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Trainingcited by 0
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generationcited by 0
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generation29 Jul 2026
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training19 Jul 2026
- 2026Evaluating LLMs on Real-World Software Performance Optimization24 Jun 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026Strategies for Guiding LLMs to Use Software Design Patterns: A Case of Singleton26 May 2026
- 2026A-ProS: Towards Reliable Autonomous Programming Through Multi-Model Feedback18 May 2026
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debugging8 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026Self-Execution Simulation Improves Coding Models11 Mar 2026
- 2026ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translation7 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
10 more
- 2025How Do Agentic AI Systems Address Performance Optimizations? A BERTopic-Based Analysis of Pull Requests31 Dec 2025
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Framework28 Dec 2025
- 2025ProofWright: Towards Agentic Formal Verification of CUDA15 Nov 2025
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Software17 Oct 2025
- 2025GUISpector: An MLLM Agent Framework for Automated Verification of Natural Language Requirements in GUI Prototypes6 Oct 2025
- 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Tasks18 Aug 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities15 Aug 2025
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Accelerators24 May 2025
- 2025Reliable Proof Generation with LLMs via Analogical Retrieval and Symbolic Verification: A Case Study in Euclidean Geometry20 May 2025
- 2025EditLord: Learning Code Transformation Rules for Code Editing10 Mar 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
- 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Taskscited by 20
- 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 8
- 2025GUISpector: An MLLM Agent Framework for Automated Verification of Natural Language Requirements in GUI Prototypescited by 1
- 2025How Do Agentic AI Systems Address Performance Optimizations? A BERTopic-Based Analysis of Pull Requestscited by 1
- 2025How Do Agentic AI Systems Address Performance Optimizations? A BERTopic-Based Analysis of Pull Requests31 Dec 2025
- 2025ProofWright: Towards Agentic Formal Verification of CUDA15 Nov 2025
- 2025GUISpector: An MLLM Agent Framework for Automated Verification of Natural Language Requirements in GUI Prototypes6 Oct 2025
- 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Tasks18 Aug 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities15 Aug 2025
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
- 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
- 2026Self-Execution Simulation Improves Coding Modelscited by 2
- 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
- 2026A-ProS: Towards Reliable Autonomous Programming Through Multi-Model Feedbackcited by 1
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translationcited by 0
- 2026SemRep: Generative Code Representation Learning with Code Transformationscited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debuggingcited by 0
12 most cited of 15 All 15 (JSON)
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generation29 Jul 2026
- 2026Evaluating LLMs on Real-World Software Performance Optimization24 Jun 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026Strategies for Guiding LLMs to Use Software Design Patterns: A Case of Singleton26 May 2026
- 2026A-ProS: Towards Reliable Autonomous Programming Through Multi-Model Feedback18 May 2026
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debugging8 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026Self-Execution Simulation Improves Coding Models11 Mar 2026
- 2026ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translation7 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 15 All 15 (JSON)