EffiBench: Benchmarking the Efficiency of Automatically Generated Code
Not on the map. Why?
Abstract (arXiv)
Code generation models have increasingly become integral to aiding software development. Although current research has thoroughly examined the correctness of the code produced by code generation models, a vital aspect that plays a pivotal role in green computing and sustainability efforts has often been neglected. This paper presents EffiBench, a benchmark with 1,000 efficiency-critical coding problems to assess the efficiency of code generated by code generation models. EffiBench contains a diverse set of LeetCode coding problems. Each problem is paired with an executable human-written canonical solution, which obtains the SOTA efficiency on the LeetCode solution leaderboard. With EffiBench, we empirically examine the ability of 42 large language models (35 open-source and 7 closed-source) to generate efficient code. Our evaluation results demonstrate that the efficiency of the code generated by LLMs is generally worse than the efficiency of human-written canonical solutions. For example, GPT-4 generated code has an average 3.12 times execution time that of the human-written canonical solutions. In the most extreme cases, the execution time and total memory usage of GPT-4 generated code are 13.89 and 43.92 times that of the canonical solutions. The source code of EffiBench is released on https://github.com/huangd1999/EffiBench. We also provide the LeaderBoard at https://huggingface.co/spaces/EffiBench/effibench-leaderboard.
Key facts. Cited by 62 papers in the map (data through 7 Oct 2026). Builds on 45 of its 88 references that are in the map. First posted on arXiv 3 Feb 2024.
Builds on
45 of 88 references.
References · 45
- 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
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 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
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021Measuring Coding Challenge Competence With APPScited by 879
33 more
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2023TACO: Topics in Algorithmic COde generation datasetcited by 150
- 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2023Learning Performance-Improving Code Editscited by 103
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
- 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 86
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2022PanGu-Coder: Program Synthesis with Function-Level Language Modelingcited by 47
- 2023Large Language Models are Edge-Case Fuzzers: Testing Deep Learning Libraries via FuzzGPTcited by 36
- 2021CoDesc: A Large Code-Description Parallel Datasetcited by 23
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
- 2022AixBench: A Code Generation Benchmark Datasetcited by 22
- 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
- 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
- 2023Source Code Data Augmentation for Deep Learning: A Surveycited by 3
Built on by
Citing papers per year: 2024: 12; 2025: 20; 2026: 30.
62 papers.
Sort:
By area:
- 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 196
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 56
- 2026ProgramBench: Can Language Models Rebuild Programs From Scratch?cited by 47
- 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 39
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 34
- 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarkscited by 31
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 28
- 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generationcited by 26
- 2025Toward Generalizable Evaluation in the LLM Era: A Survey Beyond Benchmarkscited by 26
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
38 more
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agentscited by 24
- 2025AlgoTune: Can Language Models Speed Up General-Purpose Numerical Programs?cited by 24
- 2024Generative Monoculture in Large Language Modelscited by 21
- 2025CodeFlowBench: A Multi-turn, Iterative Benchmark for Complex Code Generationcited by 16
- 2024EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningcited by 15
- 2025SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?cited by 15
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
- 2025MaintainCoder: Maintainable Code Generation Under Dynamic Requirementscited by 13
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025Regression Language Models for Codecited by 10
- 2024Beyond Correctness: Benchmarking Multi-dimensional Code Generation for Large Language Modelscited by 9
- 2024Measuring the Influence of Incorrect Code on Test Generationcited by 9
- 2024CursorCore: Assist Programming through Aligning Anythingcited by 6
- 2025Generating Energy-Efficient Code via Large-Language Models -- Where are we now?cited by 5
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2025Evaluating the Energy-Efficiency of the Code Generated by LLMscited by 3
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2026PerfCodeBench: Benchmarking LLMs for System-Level High-Performance Code Optimizationcited by 2
- 2026Evaluating LLMs on Real-World Software Performance Optimizationcited by 2
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimizationcited by 2
- 2025Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programmingcited by 1
- 2026AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptationcited by 1
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMscited by 0
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Softwarecited by 0
- 2026EvoCodeBench: A Human-Performance Benchmark for Self-Evolving LLM-Driven Coding Systemscited by 0
- 2026MobileKernelBench: Can LLMs Write Efficient Kernels for Mobile Devices?cited by 0
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026Task Abstention for Large Language Models in Code Generationcited by 0
- 2026AutoVecCoder: Teaching LLMs to Generate Explicitly Vectorized Codecited by 0
- 2026CodeGolf Bench: A Multi-Language Benchmark for Evaluating Concise Code Generation Capabilities of Large Language Modelscited by 0
- 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?cited by 0
- 2026Watts and Debts of Agentic Frameworks: An Empirical Study (Registered Report)cited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learningcited by 0
50 most cited of 62 All 62 (JSON)
- 2026LLMs as Adaptive Meta-Solvers: Strategy-Diverse RL for Industrial-Scale Optimization28 Sep 2026
- 2026An Empirical Evaluation of Cost-Efficient Large Language Models on Algorithmic Programming Tasks16 Sep 2026
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026Substrate-Aware AI Agents: Execution Context as a First-Class Input4 Sep 2026
- 2026WeSCE: A Benchmark for Measuring Security Drift in LLM-Driven Code Editing15 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026
- 2026Optimal Stopping of Self-Refining Foundation Models11 Aug 2026
- 2026LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs6 Aug 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generation29 Jul 2026
- 2026PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization22 Jul 2026
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization8 Jul 2026
38 more
- 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
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026Watts and Debts of Agentic Frameworks: An Empirical Study (Registered Report)9 Jun 2026
- 2026CodegenBench: Can LLMs Write Efficient Code Across Architectures?1 Jun 2026
- 2026CodeGolf Bench: A Multi-Language Benchmark for Evaluating Concise Code Generation Capabilities of Large Language Models28 May 2026
- 2026AutoVecCoder: Teaching LLMs to Generate Explicitly Vectorized Code18 May 2026
- 2026Task Abstention for Large Language Models in Code Generation16 May 2026
- 2026PerfCodeBench: Benchmarking LLMs for System-Level High-Performance Code Optimization13 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026ProgramBench: Can Language Models Rebuild Programs From Scratch?5 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026MobileKernelBench: Can LLMs Write Efficient Kernels for Mobile Devices?12 Mar 2026
- 2026EvoCodeBench: A Human-Performance Benchmark for Self-Evolving LLM-Driven Coding Systems10 Feb 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2026AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation8 Jan 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?8 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Do AI Models Dream of Faster Code? An Empirical Study on LLM-Proposed Performance Improvements in Real-World Software17 Oct 2025
- 2025Regression Language Models for Code30 Sep 2025
- 2025Generating Energy-Efficient Code via Large-Language Models -- Where are we now?12 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
- 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMs4 Jun 2025
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agents29 May 2025
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization29 May 2025
- 2025Evaluating the Energy-Efficiency of the Code Generated by LLMs23 May 2025
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code19 May 2025
- 2025CodeFlowBench: A Multi-turn, Iterative Benchmark for Complex Code Generation30 Apr 2025
- 2025Toward Generalizable Evaluation in the LLM Era: A Survey Beyond Benchmarks26 Apr 2025
- 2025MaintainCoder: Maintainable Code Generation Under Dynamic Requirements31 Mar 2025
- 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generation10 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness17 Feb 2025
50 newest of 62 All 62 (JSON)
- 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generationcited by 26
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agentscited by 24
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2026Watts and Debts of Agentic Frameworks: An Empirical Study (Registered Report)cited by 0
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimizationcited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026Substrate-Aware AI Agents: Execution Context as a First-Class Inputcited by 0
- 2026Substrate-Aware AI Agents: Execution Context as a First-Class Input4 Sep 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization8 Jul 2026
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2026Watts and Debts of Agentic Frameworks: An Empirical Study (Registered Report)9 Jun 2026
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agents29 May 2025
- 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generation10 Mar 2025
- 2026Rethinking Code Performance Benchmarks for LLMscited by 0
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 196
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2026ProgramBench: Can Language Models Rebuild Programs From Scratch?cited by 47
- 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 39
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 34
- 2025Geak: Introducing Triton Kernel AI Agent & Evaluation Benchmarkscited by 31
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 28
- 2025Toward Generalizable Evaluation in the LLM Era: A Survey Beyond Benchmarkscited by 26
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 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
- 2024Generative Monoculture in Large Language Modelscited by 21
12 most cited of 49 All 49 (JSON)
- 2026LLMs as Adaptive Meta-Solvers: Strategy-Diverse RL for Industrial-Scale Optimization28 Sep 2026
- 2026An Empirical Evaluation of Cost-Efficient Large Language Models on Algorithmic Programming Tasks16 Sep 2026
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization13 Sep 2026
- 2026WeSCE: A Benchmark for Measuring Security Drift in LLM-Driven Code Editing15 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026
- 2026Optimal Stopping of Self-Refining Foundation Models11 Aug 2026
- 2026LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs6 Aug 2026
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generation29 Jul 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
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
12 newest of 49 All 49 (JSON)