atlas

Research map / Large language models / Agents, code and math

EffiBench: Benchmarking the Efficiency of Automatically Generated Code

NeurIPS 2024 · Large language models › Agents, code and math · approach: Software engineering agents · 6 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces EffiBench, a 1,000-problem LeetCode-based benchmark with canonical human solutions and new normalized execution-time and memory metrics, used to show that code from 42 LLMs is substantially less efficient than canonical solutions.

Problem

Code generation benchmarks focus on correctness and rarely measure the efficiency (execution time and memory) of LLM-generated code, leaving efficiency gaps unexamined.

Approach

Pairs 1,000 efficiency-critical LeetCode problems with top-rated human canonical solutions and LLM-generated test-case generators, then measures normalized execution time, max memory, and total memory (area under memory-time curve) relative to canonical code.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Generate code with GPT-4 instead of using human-written canonical solutionsGPT-4 · EffiBenchNET: 1 -> 3.12Hurt
Generate code with GPT-4 instead of using human-written canonical solutionsGPT-4 · EffiBenchNTMU: 1 -> 6.36Hurt
Use StarCoder2-15B instead of human-written canonical solutionsStarCoder2-15B · EffiBenchNET: 1 -> 2.59Hurt
Use StarCoder2-15B instead of human-written canonical solutionsStarCoder2-15B · EffiBenchNTMU: 1 -> 4.83Hurt
Upgrade GPT-3.5-turbo from version 0301 to 1106GPT-3.5-turbo · EffiBenchNET: 3.18x -> 3.40xHurt
Generate code with OpenCodeInterpreter-DS-1.3B rather than the canonical solutionOpenCodeInterpreter-DS-1.3B · HumanEvalPlusNET: 1 -> 0.86Helped

Surprising findings

Limitations

Experimental setup

Datasets: LeetCode problems (HuggingFace LeetCode collection) LeetCode discussion top-starred canonical solutions

Benchmarks: EffiBench HumanEvalPlus MBPPPlus

Metrics: execution time (ET) normalized execution time (NET) max memory usage (MU) normalized max memory usage (NMU) total memory usage (TMU) normalized total memory usage (NTMU) pass@1

Baselines: HumanEval MBPP APPS DS-1000 DSP HumanEvalPlus MBPPPlus Mercury

Builds on: MBPP DS-1000

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy