# Large Language Models for Energy-Efficient Code: Emerging Results and Future Directions

arXiv: https://arxiv.org/abs/2410.09241 · HTML: https://mlsanity.com/paper/2410.09241/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 11 Oct 2024.

## Built on by (most cited first, 2 of 2)

- [Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programming](https://mlsanity.com/paper/2508.08332/) (2025)
- [Beyond Local Code Optimization: Multi-Agent Reasoning for Software System Optimization](https://mlsanity.com/paper/2603.14703/) (2026)

## Abstract (arXiv)

Energy-efficient software helps improve mobile device experiences and reduce the carbon footprint of data centers. However, energy goals are often de-prioritized in order to meet other requirements. We take inspiration from recent work exploring the use of large language models (LLMs) for different software engineering activities. We propose a novel application of LLMs: as code optimizers for energy efficiency. We describe and evaluate a prototype, finding that over 6 small programs our system can improve energy efficiency in 3 of them, up to 2x better than compiler optimizations alone. From our experience, we identify some of the challenges of energy-efficient LLM code optimization and propose a research agenda.
