Reproduce “EffiBench: Benchmarking the Efficiency of Automatically Generated Code” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Dong Huang, Yuhao Qing, Weiyi Shang, Heming Cui, Jie M.Zhang
Researchers from The University of Hong Kong and collaborating institutions developed EFFIBENCH, the first benchmark dedicated to evaluating the efficiency of code generated by large language models. Their evaluation across 42 LLMs reveals that automatically generated code is consistently and significantly less efficient than human-written solutions, with leading models like GPT-4 producing code 3.12 times slower and using 6.36 times more memory on average.
Key insights
- Code generated by state-of-the-art LLMs is consistently and significantly less efficient than human-written solutions across all measured performance and memory metrics.
- A model's ability to generate functionally correct code (high pass@1 score) does not necessarily correlate with its ability to produce efficient code; newer versions may even show decreased efficiency.
- LLMs exhibit particular weaknesses in generating efficient solutions for complex algorithmic paradigms such as Dynamic Programming and Backtracking, often opting for memory-intensive or sub-optimal approaches.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.