How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmark
Not on the map. Why?
Abstract (arXiv)
The emergence of large language models (LLMs) has significantly pushed the frontiers of program synthesis. Advancement of LLM-based program synthesis calls for a thorough evaluation of LLM-generated code. Most evaluation frameworks focus on the (functional) correctness of generated code; efficiency, as an important measure of code quality, has been overlooked in existing evaluations. In this work, we develop ENAMEL (EfficeNcy AutoMatic EvaLuator), a rigorous and high-standard benchmark for evaluating the capability of LLMs in generating efficient code. Firstly, we propose a new efficiency metric called eff@k, which generalizes the pass@k metric from correctness to efficiency and appropriately handles right-censored execution time. Furthermore, we derive an unbiased and variance-reduced estimator of eff@k via Rao--Blackwellization; we also provide a numerically stable implementation for the new estimator. Secondly, to set a high-standard for efficiency evaluation, we employ a human expert to design best algorithms and implementations as our reference solutions of efficiency, many of which are much more efficient than existing canonical solutions in HumanEval and HumanEval+. Moreover, to ensure a rigorous evaluation, we employ a human expert to curate strong test case generators to filter out wrong code and differentiate suboptimal algorithms. An extensive study across 30 popular LLMs using our benchmark ENAMEL shows that LLMs still fall short of generating expert-level efficient code. Using two subsets of our problem set, we demonstrate that such deficiency is because current LLMs struggle in designing advanced algorithms and are barely aware of implementation optimization. Our benchmark is publicly available at https://github.com/q-rz/enamel .
Key facts. Cited by 39 papers in the map (data through 7 Oct 2026). Builds on 36 of its 79 references that are in the map. First posted on arXiv 10 Jun 2024.
Builds on
36 of 79 references.
References · 36
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 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
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Mixtral of Expertscited by 1,785
- 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
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
24 more
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
- 2022DIMES: A Differentiable Meta Solver for Combinatorial Optimization Problemscited by 127
- 2024Discrete-state Continuous-time Diffusion for Graph Generationcited by 73
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2021EE-Net: Exploitation-Exploration Neural Networks in Contextual Banditscited by 43
- 2018Neural-Guided Deductive Search for Real-Time Program Synthesis from Examplescited by 39
- 2024Can Large Language Models Write Parallel Code?cited by 36
- 2023Networked Time Series Imputation via Position-aware Graph Enhanced Variational Autoencoderscited by 32
- 2023Class-Imbalanced Graph Learning without Class Rebalancingcited by 29
- 2023Ensuring User-side Fairness in Dynamic Recommender Systemscited by 27
- 2024Towards Unified Multi-Modal Personalization: Large Vision-Language Models for Generative Recommendation and Beyondcited by 25
- 2023Graph Neural Banditscited by 20
- 2024Logic Query of Thoughts: Guiding Large Language Models to Answer Complex Logic Queries with Knowledge Graphscited by 20
- 2024On Evaluating the Efficiency of Source Code Generated by LLMscited by 19
- 2023B-Coder: Value-Based Deep Reinforcement Learning for Program Synthesiscited by 16
- 2023Reconstructing Graph Diffusion History from a Single Snapshotcited by 13
- 2024Gradient Compressed Sensing: A Query-Efficient Gradient Estimator for High-Dimensional Zeroth-Order Optimizationcited by 12
- 2023BeMap: Balanced Message Passing for Fair Graph Neural Networkcited by 11
- 2023A Metadata-Driven Approach to Understand Graph Neural Networkscited by 10
Built on by
Citing papers per year: 2024: 1; 2025: 23; 2026: 15.
39 papers.
Sort:
By area:
- 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarkscited by 31
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?cited by 24
- 2025SelfElicit: Your Language Model Secretly Knows Where is the Relevant Evidencecited by 18
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
- 2025Breaking Silos: Adaptive Model Fusion Unlocks Better Time Series Forecastingcited by 12
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2024Ask, and it shall be given: On the Turing completeness of promptingcited by 10
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 8
- 2026Prune as You Generate: Online Rollout Pruning for Faster and Better RLVRcited by 8
- 2025Graph Data Selection for Domain Adaptation: A Model-Free Approachcited by 7
27 more
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
- 2025LLM Program Optimization via Retrieval Augmented Searchcited by 4
- 2025Pluto: A Benchmark for Evaluating Efficiency of LLM-generated Hardware Codecited by 3
- 2025Continual Low-Rank Adapters for LLM-based Generative Recommender Systemscited by 2
- 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimizationcited by 2
- 2025Optimizing Code Runtime Performance through Context-Aware Retrieval-Augmented Generationcited by 1
- 2025CoCo-Bench: A Comprehensive Code Benchmark For Multi-task Large Language Model Evaluationcited by 1
- 2025Saffron-1: Safety Inference Scalingcited by 1
- 2025Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programmingcited by 1
- 2025Graph Homophily Booster: Rethinking the Role of Discrete Features on Heterophilic Graphscited by 1
- 2025Can Vibe Coding Beat Graduate CS Students? An LLM vs. Human Coding Tournament on Market-driven Strategic Planningcited by 1
- 2026Graph homophily booster: Reimagining the role of discrete features in heterophilic graph learningcited by 1
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
- 2026Discovery of Interpretable Surrogates via Agentic AI: Application to Gravitational Wavescited by 1
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
- 2025LLMs Judge Themselves: A Game-Theoretic Framework for Human-Aligned Evaluationcited by 0
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?cited by 0
- 2026Structuring and Tokenizing Distributed User Interest Context for Generative Recommendationcited by 0
- 2026Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learningcited by 0
- 2026Rethinking Code Performance Benchmarks for LLMscited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithmscited by 0
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimizationcited by 0
- 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learningcited by 0
- 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learning15 Sep 2026
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithms26 Jul 2026
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization22 Jul 2026
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2026Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning6 Jul 2026
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2026Evaluating LLMs on Real-World Software Performance Optimization24 Jun 2026
- 2026Structuring and Tokenizing Distributed User Interest Context for Generative Recommendation18 Jun 2026
- 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?1 Jun 2026
- 2026Discovery of Interpretable Surrogates via Agentic AI: Application to Gravitational Waves11 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
27 more
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026Prune as You Generate: Online Rollout Pruning for Faster and Better RLVR25 Mar 2026
- 2026Graph homophily booster: Reimagining the role of discrete features in heterophilic graph learning6 Feb 2026
- 2025Can Vibe Coding Beat Graduate CS Students? An LLM vs. Human Coding Tournament on Market-driven Strategic Planning25 Nov 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
- 2025Continual Low-Rank Adapters for LLM-based Generative Recommender Systems29 Oct 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025LLMs Judge Themselves: A Game-Theoretic Framework for Human-Aligned Evaluation17 Oct 2025
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Software17 Oct 2025
- 2025Pluto: A Benchmark for Evaluating Efficiency of LLM-generated Hardware Code16 Oct 2025
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivity24 Sep 2025
- 2025Graph Homophily Booster: Rethinking the Role of Discrete Features on Heterophilic Graphs16 Sep 2025
- 2025Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programming10 Aug 2025
- 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarks31 Jul 2025
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?19 Jul 2025
- 2025Saffron-1: Safety Inference Scaling6 Jun 2025
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization29 May 2025
- 2025Breaking Silos: Adaptive Model Fusion Unlocks Better Time Series Forecasting24 May 2025
- 2025Graph Data Selection for Domain Adaptation: A Model-Free Approach22 May 2025
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code19 May 2025
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025CoCo-Bench: A Comprehensive Code Benchmark For Multi-task Large Language Model Evaluation29 Apr 2025
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness17 Feb 2025
- 2025SelfElicit: Your Language Model Secretly Knows Where is the Relevant Evidence12 Feb 2025
- 2025LLM Program Optimization via Retrieval Augmented Search31 Jan 2025
- 2025Optimizing Code Runtime Performance through Context-Aware Retrieval-Augmented Generation28 Jan 2025
- 2024Ask, and it shall be given: On the Turing completeness of prompting4 Nov 2024
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2026Discovery of Interpretable Surrogates via Agentic AI: Application to Gravitational Wavescited by 1
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithmscited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithms26 Jul 2026
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2026Discovery of Interpretable Surrogates via Agentic AI: Application to Gravitational Waves11 May 2026
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarkscited by 31
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?cited by 24
- 2025SelfElicit: Your Language Model Secretly Knows Where is the Relevant Evidencecited by 18
- 2025Breaking Silos: Adaptive Model Fusion Unlocks Better Time Series Forecastingcited by 12
- 2024Ask, and it shall be given: On the Turing completeness of promptingcited by 10
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 8
- 2025Graph Data Selection for Domain Adaptation: A Model-Free Approachcited by 7
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
- 2025Pluto: A Benchmark for Evaluating Efficiency of LLM-generated Hardware Codecited by 3
- 2025Continual Low-Rank Adapters for LLM-based Generative Recommender Systemscited by 2
12 most cited of 26 All 26 (JSON)
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization22 Jul 2026
- 2026Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning6 Jul 2026
- 2026Evaluating LLMs on Real-World Software Performance Optimization24 Jun 2026
- 2026Structuring and Tokenizing Distributed User Interest Context for Generative Recommendation18 Jun 2026
- 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?1 Jun 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026Graph homophily booster: Reimagining the role of discrete features in heterophilic graph learning6 Feb 2026
- 2025Can Vibe Coding Beat Graduate CS Students? An LLM vs. Human Coding Tournament on Market-driven Strategic Planning25 Nov 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
- 2025Continual Low-Rank Adapters for LLM-based Generative Recommender Systems29 Oct 2025
12 newest of 26 All 26 (JSON)