Prépublication · 2026
Green Code or Costly Code? Evaluating the Energy Costs of Iterative LLM-Based Code Optimizations
Sadra Emami, Benjamin Weigell et al. — Monde
Source : arXiv
Résumé
Large Language Models (LLMs) are increasingly used to optimize code for performance. This practice often assumes that improvements in execution speed naturally translate into overall lower energy consumption. We challenge this assumption empirically by measuring whether performance-optimized code produced by LLM self-refinement pipelines is also energy-efficient relative to canonical human reference solutions, and whether the energy cost of the optimization process can be offset by subsequent execution-time savings. We evaluate 11 open-source models across four decoding configurations on all 1…