Generating Energy-Efficient Code via Large-Language Models -- Where are we now?
Not on the map. Why?
Abstract (arXiv)
Context. The rise of Large Language Models (LLMs) has led to their widespread adoption in development pipelines. Goal. We empirically assess the energy efficiency of Python code generated by LLMs against human-written code and code developed by a Green software expert. Method. We test 363 solutions to 9 coding problems from the EvoEval benchmark using 6 widespread LLMs with 4 prompting techniques, and comparing them to human-developed solutions. Energy consumption is measured on three different hardware platforms: a server, a PC, and a Raspberry Pi for a total of ~881h (36.7 days). Results. Human solutions are 16% more energy-efficient on the server and 3% on the Raspberry Pi, while LLMs outperform human developers by 25% on the PC. Prompting does not consistently lead to energy savings, where the most energy-efficient prompts vary by hardware platform. The code developed by a Green software expert is consistently more energy-efficient by at least 17% to 30% against all LLMs on all hardware platforms. Conclusions. Even though LLMs exhibit relatively good code generation capabilities, no LLM-generated code was more energy-efficient than that of an experienced Green software developer, suggesting that as of today there is still a great need of human expertise for developing energy-efficient Python code.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 25 of its 79 references that are in the map. First posted on arXiv 12 Sep 2025.
Builds on
25 of 79 references.
References · 25
- 2017Attention Is All You Needcited by 59,932
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2017Prototypical Networks for Few-shot Learningcited by 3,001
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2023The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Developmentcited by 95
- 2023A Systematic Review of Green AIcited by 77
- 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
- 2023Towards an Understanding of Large Language Models in Software Engineering Taskscited by 67
13 more
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2024A Performance Study of LLM-Generated Code on Leetcodecited by 48
- 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forwardcited by 44
- 2021An Aligned Rank Transform Procedure for Multifactor Contrast Testscited by 11
- 2025Generative AI and Empirical Software Engineering: A Paradigm Shiftcited by 9
- 2025AI-Powered, But Power-Hungry? Energy Efficiency of LLM-Generated Codecited by 8
- 2025LLMs for Generation of Architectural Components: An Exploratory Empirical Study in the Serverless Worldcited by 8
- 2024Evaluation of large language models for assessing code maintainabilitycited by 5
- 2024Unveiling the Energy Vampires: A Methodology for Debugging Software Energy Consumptioncited by 4
- 2019GPU Computing with Python: Performance, Energy Efficiency and Usabilitycited by 1
- 2021Toward Efficient Interactions between Python and Native Librariescited by 1
- 2024Reproducibility, energy efficiency and performance of pseudorandom number generators in machine learning: a comparative study of python, numpy, tensorflow, and pytorch implementationscited by 1
- 2024Estimating the Energy Footprint of Software Systems: a Primercited by 1
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025SWEnergy: An Empirical Study on Energy Efficiency in Agentic Issue Resolution Frameworks with SLMscited by 5
- 2025GA4GC: Greener Agent for Greener Code via Multi-Objective Configuration Optimizationcited by 3
- 2026Towards Green AI: Decoding the Energy of LLM Inference in Software Developmentcited by 2
- 2026An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Codecited by 0
- 2026Characterizing the Quality Profile of AI-Generated C++ in Productioncited by 0
- 2026Characterizing the Quality Profile of AI-Generated C++ in Production6 Aug 2026
- 2026An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Code3 Mar 2026
- 2026Towards Green AI: Decoding the Energy of LLM Inference in Software Development5 Feb 2026
- 2025SWEnergy: An Empirical Study on Energy Efficiency in Agentic Issue Resolution Frameworks with SLMs10 Dec 2025
- 2025GA4GC: Greener Agent for Greener Code via Multi-Objective Configuration Optimization5 Oct 2025