EnergyBench: Holistic Benchmark for Correct and Energy-Efficient LLM-Generated Code

The increasing use of Large Language Models (LLMs) for automated software development creates a paradox: LLM-generated code can boost energy efficiency across industries through digital transformation but their often unsupervised usage unintentionally generates energy-inefficient code when functional correctness is prioritized. Current benchmarks show that LLMs generate energy-efficient code when prompted with optimized instructions. However, it is unclear for which problems, programming languages, and prompting strategies lead to the best trade-off between correctness and energy efficiency. To address the current gaps in untested prompts, this work uses a systematic approach to analyze which prompt elements lead to LLMs generating correct and energy-efficient code. Results reveal that prompt engineering increases code energy efficiency by up to 91.9 % in some cases, but often reduces accuracy. Our novel approach, inspired by Holistic Evaluation of Language Models (HELM), reveals that LLMs are sensitive to prompt contents. One result shows that the energy efficiency increases by more than <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$4 \times$</tex> when half of the programming problem description is removed, while in other cases accuracy drops to zero.

Authors

Institutions

Publication Details

Published
2025-10-14
DOI
https://doi.org/10.1109/flta67013.2025.11336593
Primary Topic
Green IT and Sustainability
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

EnergyBench: Holistic Benchmark for Correct and Energy-Efficient LLM-Generated Code

Søren Kejser Jensen, Bent L. Thomsen, Dragoș Ionescu
Green IT and Sustainability
article

EnergyBench: Holistic Benchmark for Correct and Energy-Efficient LLM-Generated Code

Søren Kejser Jensen, Bent L. Thomsen, Dragoș Ionescu
article en

Abstract

The increasing use of Large Language Models (LLMs) for automated software development creates a paradox: LLM-generated code can boost energy efficiency across industries through digital transformation but their often unsupervised usage unintentionally generates energy-inefficient code when functional correctness is prioritized. Current benchmarks show that LLMs generate energy-efficient code when prompted with optimized instructions. However, it is unclear for which problems, programming languages, and prompting strategies lead to the best trade-off between correctness and energy efficiency. To address the current gaps in untested prompts, this work uses a systematic approach to analyze which prompt elements lead to LLMs generating correct and energy-efficient code. Results reveal that prompt engineering increases code energy efficiency by up to 91.9 % in some cases, but often reduces accuracy. Our novel approach, inspired by Holistic Evaluation of Language Models (HELM), reveals that LLMs are sensitive to prompt contents. One result shows that the energy efficiency increases by more than <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$4 \times$</tex> when half of the programming problem description is removed, while in other cases accuracy drops to zero.

Aalborg University (DK)
Affordable and clean energy
Openalex Percentile: Top 39%
Green IT and Sustainability
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

EnergyBench: Holistic Benchmark for Correct and Energy-Efficient LLM-Generated Code — Søren Kejser Jensen, Bent L. Thomsen, et al. · (2025) | TGRS Research Map | TGRS