AI Research
New Benchmark Reveals Large Language Models Generate Correct but Inefficient Code Across Multiple Languages
EffiBench-X, a benchmark spanning six programming languages, exposes a critical gap: while LLMs produce functionally sound code, they fall short of human efficiency by a substantial margin.
Researchers have introduced EffiBench-X, a novel evaluation framework that measures how efficiently large language models generate code—revealing a significant performance gap between machine-generated and human-written solutions.
The Efficiency Problem#
Most existing code generation benchmarks focus narrowly on whether generated code works at all, paying minimal attention to how well it performs. EffiBench-X fills this void by assessing code efficiency across a diverse set of programming languages. The benchmark draws from competitive programming challenges and uses expert human solutions as performance baselines, enabling direct comparison between what LLMs produce and what skilled programmers write.
What the Testing Showed#
When evaluated on EffiBench-X, even the strongest-performing large language models substantially lagged behind human efficiency. The most efficient LLM tested (Qwen3-32B) achieved roughly 62% of human performance on average—a notable shortfall that underscores a fundamental weakness in current code generation systems. Performance varied significantly depending on the language: models proved more adept at generating efficient Python, Ruby, and JavaScript code than they were with Java, C++, and Golang. For example, DeepSeek-R1 produced Python solutions that were markedly more efficient than its Java equivalents.
Language Support and Scale#
The benchmark supports six programming languages: Python, C++, Java, JavaScript, Ruby, and Golang. This multi-language scope allows researchers to study whether efficiency gaps stem from inherent model limitations or language-specific training patterns. The dataset and associated evaluation tools have been released for broader research use.
Why This Matters#
The findings highlight that functional correctness—the traditional marker of success in code generation—masks deeper shortcomings. As organizations increasingly rely on LLMs to assist with software development, code efficiency directly impacts system performance, energy consumption, and infrastructure costs. Improving LLM optimization capabilities across diverse languages remains an important open research challenge.