EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimization
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have shown remarkable progress in code generation, but their generated code often suffers from inefficiency, resulting in longer execution times and higher memory consumption. To address this issue, we propose EffiLearner, a self-optimization framework that utilizes execution overhead profiles to improve the efficiency of LLM-generated code. EffiLearner first generates code using an LLM, then executes it locally to capture execution time and memory usage profiles. These profiles are fed back to the LLM, which then revises the code to reduce overhead. To evaluate the effectiveness of EffiLearner, we conduct extensive experiments on the EffiBench, HumanEval, and MBPP with 16 open-source and 6 closed-source models. Our evaluation results demonstrate that through iterative self-optimization, EffiLearner significantly enhances the efficiency of LLM-generated code. For example, the execution time (ET) of StarCoder2-15B for the EffiBench decreases from 0.93 (s) to 0.12 (s) which reduces 87.1% the execution time requirement compared with the initial code. The total memory usage (TMU) of StarCoder2-15B also decreases from 22.02 (Mb*s) to 2.03 (Mb*s), which decreases 90.8% of total memory consumption during the execution process. The source code of EffiLearner was released in https://github.com/huangd1999/EffiLearner
Key facts. Cited by 30 papers in the map (data through 14 Oct 2026). Builds on 48 of its 73 references that are in the map. First posted on arXiv 24 May 2024.
Builds on
48 of 73 references.
References · 48
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
36 more
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2023Textbooks Are All You Needcited by 569
- 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 565
- 2022Improving alignment of dialogue agents via targeted human judgementscited by 531
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 256
- 2024OpenCodeInterpreter: Integrating Code Generation with Execution and Refinementcited by 247
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 189
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 181
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 111
- 2023Learning Performance-Improving Code Editscited by 106
- 2023Improving Language Models via Plug-and-Play Retrieval Feedbackcited by 87
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2018Can Neural Machine Translation be Improved with User Feedback?cited by 72
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 64
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2023Prompt2Model: Generating Deployable Models from Natural Language Instructionscited by 41
- 2023Large Language Models are Edge-Case Fuzzers: Testing Deep Learning Libraries via FuzzGPTcited by 36
- 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 26
- 2021CoDesc: A Large Code-Description Parallel Datasetcited by 23
- 2024On Evaluating the Efficiency of Source Code Generated by LLMscited by 21
- 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
- 2024Efficient and Green Large Language Models for Software Engineering: Literature Review, Vision, and the Road Aheadcited by 17
- 2024Learning From Correctness Without Prompting Makes LLM Efficient Reasonercited by 15
- 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
Built on by
Citing papers per year: 2024: 2; 2025: 12; 2026: 16.
30 papers.
Sort:
By area:
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Modelscited by 320
- 2024MR-Ben: A Meta-Reasoning Benchmark for Evaluating System-2 Thinking in LLMscited by 30
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 28
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 27
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 18
- 2026Controlled Self-Evolution for Algorithmic Code Optimizationcited by 12
- 2024Measuring the Influence of Incorrect Code on Test Generationcited by 11
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 9
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
- 2025Learning Game-Playing Agents with Generative Code Optimizationcited by 8
- 2026Scaling Coding Agents via Atomic Skillscited by 8
18 more
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2025SuperCoder: Assembly Program Superoptimization with Large Language Modelscited by 6
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Modelscited by 5
- 2026Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requestscited by 4
- 2026MaxCode: A Max-Reward Reinforcement Learning Framework for Automated Code Optimizationcited by 4
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approachcited by 2
- 2026MOSAIC: Modular Orchestration for Structured Agentic Intelligence and Compositioncited by 2
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026STAB: Specification-driven Testing for Algorithmic Bottleneckscited by 0
- 2026Rethinking Code Performance Benchmarks for LLMscited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Trainingcited by 0
- 2026Optimal Stopping of Self-Refining Foundation Modelscited by 0
- 2026RESKILL: Explicit Failure Attribution and Structured Repair for Interactive Language Agentscited by 0
- 2026Improving the Energy-Efficiency of the Code Generated by LLMs through Effective Promptingcited by 0
- 2026Not All Correct Fixes Run Alike: An Empirical Study of Patch Performance in Repository-Level Issue Resolutioncited by 0
- 2026Not All Correct Fixes Run Alike: An Empirical Study of Patch Performance in Repository-Level Issue Resolution9 Oct 2026
- 2026Improving the Energy-Efficiency of the Code Generated by LLMs through Effective Prompting1 Oct 2026
- 2026RESKILL: Explicit Failure Attribution and Structured Repair for Interactive Language Agents14 Sep 2026
- 2026Optimal Stopping of Self-Refining Foundation Models11 Aug 2026
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training19 Jul 2026
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2026MOSAIC: Modular Orchestration for Structured Agentic Intelligence and Composition30 May 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026Scaling Coding Agents via Atomic Skills6 Apr 2026
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimization29 Mar 2026
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Models4 Feb 2026
18 more
- 2026Controlled Self-Evolution for Algorithmic Code Optimization12 Jan 2026
- 2026MaxCode: A Max-Reward Reinforcement Learning Framework for Automated Code Optimization9 Jan 2026
- 2026Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requests8 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025ProofWright: Towards Agentic Formal Verification of CUDA15 Nov 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Learning Game-Playing Agents with Generative Code Optimization27 Aug 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities15 Aug 2025
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach5 Aug 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization29 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
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Models24 Feb 2025
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness17 Feb 2025
- 2024Measuring the Influence of Incorrect Code on Test Generation14 Sep 2024
- 2024MR-Ben: A Meta-Reasoning Benchmark for Evaluating System-2 Thinking in LLMs20 Jun 2024
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 28
- 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 9
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
- 2025Learning Game-Playing Agents with Generative Code Optimizationcited by 8
- 2026Scaling Coding Agents via Atomic Skillscited by 8
- 2026Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requestscited by 4
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approachcited by 2
- 2026MOSAIC: Modular Orchestration for Structured Agentic Intelligence and Compositioncited by 2
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2026RESKILL: Explicit Failure Attribution and Structured Repair for Interactive Language Agentscited by 0
- 2026RESKILL: Explicit Failure Attribution and Structured Repair for Interactive Language Agents14 Sep 2026
- 2026MOSAIC: Modular Orchestration for Structured Agentic Intelligence and Composition30 May 2026
- 2026Scaling Coding Agents via Atomic Skills6 Apr 2026
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimization29 Mar 2026
- 2026Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requests8 Jan 2026
- 2025ProofWright: Towards Agentic Formal Verification of CUDA15 Nov 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Learning Game-Playing Agents with Generative Code Optimization27 Aug 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities15 Aug 2025
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach5 Aug 2025
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 27
- 2026Controlled Self-Evolution for Algorithmic Code Optimizationcited by 12
- 2024Measuring the Influence of Incorrect Code on Test Generationcited by 11
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2025SuperCoder: Assembly Program Superoptimization with Large Language Modelscited by 6
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026STAB: Specification-driven Testing for Algorithmic Bottleneckscited by 0
- 2026Optimal Stopping of Self-Refining Foundation Modelscited by 0
- 2026Improving the Energy-Efficiency of the Code Generated by LLMs through Effective Promptingcited by 0
12 most cited of 13 All 13 (JSON)
- 2026Not All Correct Fixes Run Alike: An Empirical Study of Patch Performance in Repository-Level Issue Resolution9 Oct 2026
- 2026Improving the Energy-Efficiency of the Code Generated by LLMs through Effective Prompting1 Oct 2026
- 2026Optimal Stopping of Self-Refining Foundation Models11 Aug 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026Controlled Self-Evolution for Algorithmic Code Optimization12 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 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
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness17 Feb 2025
12 newest of 13 All 13 (JSON)