mlsanityData to 7 Oct 2026

How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmark

arXiv 2406.06647 ↗First posted 10 Jun 2024cs.SE cs.AI cs.LGcited by 39

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  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. 2021Program Synthesis with Large Language Modelscited by 3,509
  7. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  9. 2024Mixtral of Expertscited by 1,785
  10. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  11. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  12. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
24 more
  1. 2021Measuring Coding Challenge Competence With APPScited by 879
  2. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  3. 2023StarCoder: may the source be with you!cited by 790
  4. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
  5. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  6. 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
  7. 2022DIMES: A Differentiable Meta Solver for Combinatorial Optimization Problemscited by 127
  8. 2024Discrete-state Continuous-time Diffusion for Graph Generationcited by 73
  9. 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
  10. 2021EE-Net: Exploitation-Exploration Neural Networks in Contextual Banditscited by 43
  11. 2018Neural-Guided Deductive Search for Real-Time Program Synthesis from Examplescited by 39
  12. 2024Can Large Language Models Write Parallel Code?cited by 36
  13. 2023Networked Time Series Imputation via Position-aware Graph Enhanced Variational Autoencoderscited by 32
  14. 2023Class-Imbalanced Graph Learning without Class Rebalancingcited by 29
  15. 2023Ensuring User-side Fairness in Dynamic Recommender Systemscited by 27
  16. 2024Towards Unified Multi-Modal Personalization: Large Vision-Language Models for Generative Recommendation and Beyondcited by 25
  17. 2023Graph Neural Banditscited by 20
  18. 2024Logic Query of Thoughts: Guiding Large Language Models to Answer Complex Logic Queries with Knowledge Graphscited by 20
  19. 2024On Evaluating the Efficiency of Source Code Generated by LLMscited by 19
  20. 2023B-Coder: Value-Based Deep Reinforcement Learning for Program Synthesiscited by 16
  21. 2023Reconstructing Graph Diffusion History from a Single Snapshotcited by 13
  22. 2024Gradient Compressed Sensing: A Query-Efficient Gradient Estimator for High-Dimensional Zeroth-Order Optimizationcited by 12
  23. 2023BeMap: Balanced Message Passing for Fair Graph Neural Networkcited by 11
  24. 2023A Metadata-Driven Approach to Understand Graph Neural Networkscited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 23; 2026: 15.

39 papers.

Sort:

By area:

  1. 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarkscited by 31
  2. 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
  3. 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?cited by 24
  4. 2025SelfElicit: Your Language Model Secretly Knows Where is the Relevant Evidencecited by 18
  5. 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
  6. 2025Breaking Silos: Adaptive Model Fusion Unlocks Better Time Series Forecastingcited by 12
  7. 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
  8. 2024Ask, and it shall be given: On the Turing completeness of promptingcited by 10
  9. 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
  10. 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 8
  11. 2026Prune as You Generate: Online Rollout Pruning for Faster and Better RLVRcited by 8
  12. 2025Graph Data Selection for Domain Adaptation: A Model-Free Approachcited by 7
27 more
  1. 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
  2. 2025LLM Program Optimization via Retrieval Augmented Searchcited by 4
  3. 2025Pluto: A Benchmark for Evaluating Efficiency of LLM-generated Hardware Codecited by 3
  4. 2025Continual Low-Rank Adapters for LLM-based Generative Recommender Systemscited by 2
  5. 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
  6. 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimizationcited by 2
  7. 2025Optimizing Code Runtime Performance through Context-Aware Retrieval-Augmented Generationcited by 1
  8. 2025CoCo-Bench: A Comprehensive Code Benchmark For Multi-task Large Language Model Evaluationcited by 1
  9. 2025Saffron-1: Safety Inference Scalingcited by 1
  10. 2025Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programmingcited by 1
  11. 2025Graph Homophily Booster: Rethinking the Role of Discrete Features on Heterophilic Graphscited by 1
  12. 2025Can Vibe Coding Beat Graduate CS Students? An LLM vs. Human Coding Tournament on Market-driven Strategic Planningcited by 1
  13. 2026Graph homophily booster: Reimagining the role of discrete features in heterophilic graph learningcited by 1
  14. 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
  15. 2026Discovery of Interpretable Surrogates via Agentic AI: Application to Gravitational Wavescited by 1
  16. 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
  17. 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
  18. 2025LLMs Judge Themselves: A Game-Theoretic Framework for Human-Aligned Evaluationcited by 0
  19. 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
  20. 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
  21. 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?cited by 0
  22. 2026Structuring and Tokenizing Distributed User Interest Context for Generative Recommendationcited by 0
  23. 2026Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learningcited by 0
  24. 2026Rethinking Code Performance Benchmarks for LLMscited by 0
  25. 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithmscited by 0
  26. 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimizationcited by 0
  27. 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learningcited by 0