mlsanityData to 7 Oct 2026

PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback

arXiv 2412.03578 ↗First posted 18 Nov 2024cs.SE cs.AI cs.CLcited by 22

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

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  7. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  8. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  9. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  10. 2021Program Synthesis with Large Language Modelscited by 3,509
  11. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
  12. 2020Learning to summarize from human feedbackcited by 2,562
38 more
  1. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  2. 2024Mixtral of Expertscited by 1,785
  3. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
  4. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
  5. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  6. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  7. 2024Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preferencecited by 1,151
  8. 2023Towards Understanding Sycophancy in Language Modelscited by 988
  9. 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 965
  10. 2023Teaching Large Language Models to Self-Debugcited by 963
  11. 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
  12. 2023ChatDev: Communicative Agents for Software Developmentcited by 893
  13. 2021Measuring Coding Challenge Competence With APPScited by 879
  14. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  15. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  16. 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
  17. 2023Open Problems and Fundamental Limitations of Reinforcement Learning from Human Feedbackcited by 743
  18. 2023Cognitive Architectures for Language Agentscited by 422
  19. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  20. 2022CodeT: Code Generation with Generated Testscited by 369
  21. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  22. 2024AutoCodeRover: Autonomous Program Improvementcited by 272
  23. 2022Generating Sequences by Learning to Self-Correctcited by 271
  24. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
  25. 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
  26. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
  27. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
  28. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 130
  29. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  30. 2023Learning Performance-Improving Code Editscited by 103
  31. 2023Is RLHF More Difficult than Standard RL?cited by 96
  32. 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 81
  33. 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 74
  34. 2023Are You Sure? Challenging LLMs Leads to Performance Drops in The FlipFlop Experimentcited by 71
  35. 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
  36. 2023LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluationscited by 58
  37. 2024The Larger the Better? Improved LLM Code-Generation via Budget Reallocationcited by 41
  38. 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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 10; 2026: 12.

22 papers.

Sort:

By area:

  1. 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
  2. 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Taskscited by 20
  3. 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
  4. 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 8
  5. 2025Reliable Proof Generation with LLMs via Analogical Retrieval and Symbolic Verification: A Case Study in Euclidean Geometrycited by 7
  6. 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
  7. 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
  8. 2026Self-Execution Simulation Improves Coding Modelscited by 2
  9. 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
  10. 2025GUISpector: An MLLM Agent Framework for Automated Verification of Natural Language Requirements in GUI Prototypescited by 1
  11. 2025How Do Agentic AI Systems Address Performance Optimizations? A BERTopic-Based Analysis of Pull Requestscited by 1
  12. 2026A-ProS: Towards Reliable Autonomous Programming Through Multi-Model Feedbackcited by 1
10 more
  1. 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
  2. 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
  3. 2026ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translationcited by 0
  4. 2026SemRep: Generative Code Representation Learning with Code Transformationscited by 0
  5. 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
  6. 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debuggingcited by 0
  7. 2026Strategies for Guiding LLMs to Use Software Design Patterns: A Case of Singletoncited by 0
  8. 2026STAB: Specification-driven Testing for Algorithmic Bottleneckscited by 0
  9. 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Trainingcited by 0
  10. 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generationcited by 0