NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

PerfArena: Ranking LLMs by Code Performance

Rui Rua, Hailemariam Mersha, Joao Paulo Fernandes, Karim AliarXiv 2026

TL;DR

PerfArena is an open-source, reproducible benchmarking platform that ranks LLMs based on the latency, memory, and energy efficiency of the code they generate. By evaluating 13 state-of-the-art models across seven programming languages, the researchers demonstrate that functional correctness is a poor proxy for performance, with "correct" solutions from different models varying in execution speed by as much as 3.6x.

What Problem Does This Paper Address?

As AI generates an increasing share of the world’s production code—reaching an estimated 75% at Google by 2026—the efficiency of that code becomes a critical economic and environmental factor. However, most existing benchmarks like HumanEval or EvalPlus focus almost exclusively on functional correctness: does the code pass the unit tests?

The authors argue that this narrow focus creates a "performance loop of hell." LLMs are trained on human-written code, which often prioritizes readability or speed of development over execution efficiency. Consequently, LLMs frequently produce code riddled with performance anti-patterns. Existing performance-oriented benchmarks are often limited to a single language (usually Python) and rarely account for energy consumption, which is vital for mobile and cloud-scale deployments.

Methods

The authors introduce PerfArena, a pluggable architecture designed to measure code performance under a rigorous, reproducible protocol.

Fig. 1. The PERFARENA architecture and the flow of one submission through steps 1 – 8 .

Key methodological innovations include:

  • The Performance Oracle: Instead of relying on inconsistent cloud-based judges, PerfArena uses a custom harness on dedicated hardware. To mitigate noise from JIT compilers and system overhead, it uses a "warmup" phase followed by a measured window of repeated executions.
  • Multi-Metric Tracking: It simultaneously tracks execution latency, peak memory (Resident Set Size), and energy consumption (using Intel’s RAPL interface and CodeCarbon).
  • Bradley-Terry Ranking: Similar to the Elo system used in chess or the Chatbot Arena, PerfArena uses head-to-head "duels" between models on specific problems to calculate a win probability and rank them.
  • Cross-Language Uniformity: Every solution for a given problem is measured using the same protocol and execution conditions across all seven supported languages.
Fig. 3. The harness process of a LeetCodeComp test case. Only calls in the measured window count toward latency. Warmup and measured window are to scale, whereas startup and teardown are not.

Datasets

The paper evaluates models using two distinct "competitions":

  1. CLBGComp: 10 compute-intensive benchmarks from the Computer Language Benchmarks Game, designed to push the limits of language runtimes.
  2. LeetCodeComp: A curated subset of 99 LeetCode problems. The authors didn't just pick these at random; they used a "fingerprinting and clustering" pipeline to select problems where algorithmic choices lead to measurable, discriminative differences in performance.
Fig. 2. Curating the measurement workload for LeetCodeComp.

The evaluation covers seven programming languages: C++, C#, Java, JavaScript, PHP, Python, and TypeScript.

Key Insights and Ideas

  • Correctness $\neq$ Efficiency: While 12 of the 13 tested LLMs passed over 90% of the LeetCode problems, the execution speed of their "correct" solutions varied wildly. The slowest model's code took 1.6x longer on average than the fastest on LeetCode, and 3.6x longer on the compute-heavy CLBG tasks.
  • The Language Gap: A model’s performance rank is not constant across languages. For instance, claude-opus-5-5 leads in Python and PHP, but gpt-6-astra dominates the other five languages.
  • Price Doesn't Buy Speed: High-cost models do not necessarily generate faster code. The authors found that gpt-6-astra is significantly more cost-effective per "correct and efficient" solution than more expensive competitors like claude-fable-5-1.
  • Energy Follows Latency: In most cases, the fastest code is also the most energy-efficient. However, on whole-program benchmarks (CLBG), the fastest solutions often draw more peak power, slightly narrowing the energy-efficiency gap compared to the latency gap.

Key Results

The researchers evaluated 13 models from providers like OpenAI, Anthropic, Google, and DeepSeek.

Selected LLMs and their pricing.
  • The Dominant Model: gpt-6-astra emerged as the clear leader. It was the only model that no other LLM could beat significantly in latency, energy, or memory across both competitions.
  • Quantitative Gaps: On average, correct solutions from other LLMs had 1.1–1.6x the latency of gpt-6-astra on LeetCodeComp and 1.2–3.6x on CLBGComp.
  • Memory Stability: Unlike latency and energy, peak memory usage was relatively stable across models, likely because the language runtimes themselves account for the bulk of the memory footprint in these specific tasks.

Limitations and Future Work

  • Hardware Dependency: Performance measurements are hardware-specific. While the relative ranking of models is likely to hold across similar architectures, absolute values would change on different CPUs or OSs.
  • Data Contamination: Since LeetCode and CLBG are public, there is a high risk that models have seen these solutions during training. The authors acknowledge this but argue that PerfArena’s value lies in its ability to be updated with new, private, or "live" competitions.
  • Single-Shot Focus: This study used single-shot prompts. Future work could explore how agentic workflows (where models iterate on their own code) impact the final performance footprint.
  • Expansion: The authors plan to continuously update the live leaderboard as new models are released.

Summary updated

Abstract

Industry now relies on LLMs to write a large share of production code. Although that code is mostly, but not always, correct, correctness alone does not determine whether it is fit for repeated and extensive use, which depends on what the code costs in time, memory and energy. Most code-generation benchmarks nonetheless evaluate correctness in isolation, and most performance-oriented benchmarks cover few languages and rarely measure energy consumption. To address this gap, we present PERFARENA, an open-source, reproducible arena that ranks LLMs by the performance of their generated code across multiple languages and competitions. PERFARENA executes the solutions of each LLM on a Unix-like host and reports correctness together with latency, peak memory, and energy consumption. Correctness oracles, performance oracles, profilers, and code-generation workflows are pluggable in PERFARENA, enabling the integration of new judging backends and measurement tools without changing the pipeline. We evaluate PERFARENA on two competitions: CLBGComp, 10 compute-intensive benchmarks from the Computer Language Benchmarks Game, and LeetCodeComp, 99 LeetCode problems whose accepted solutions differ measurably in latency. Currently, PERFARENA holds 9,455 correct and measured solutions from 13 state-of-the-art LLMs across 7 programming languages. Across both competitions, got-6-astra is the only LLM that no other LLM beats significantly in latency, energy consumption, or peak memory, solving 99.7% of LeetCodeComp and 100% of CLBGComp. All PERFARENA leaderboards and measured solutions are publicly available, providing a continuously updated reference that helps developers choose an LLM per language and metric, instead of relying only on correctness rates or pricing.
BibTeX
@misc{rua2026perfarena,
  author = {Rui Rua and Hailemariam Mersha and Joao Paulo Fernandes and Karim Ali},
  title = {{PerfArena: Ranking LLMs by Code Performance}},
  year = {2026},
  eprint = {2611.18030},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18030},
}
Figure