Grupo Alarcos · Conference paper · 2025
Evaluating Programming Optimization Techniques in C and Python: Impact on Energy Consumption
Carlos Pulido Hernández, Félix Óscar García Rubio, María Ángeles Moraga de la Rubia, Coral Calero Muñoz, Miguel Baños Gonzalez, Jorge Cancho Casado, Javier Corral García
Software plays a critical role in modern society, but its energy consumption is a growing concern. The Internet of Things (IoT) exemplifies this challenge, with billions of devices relying on C for energy efficiency. Outside the IoT domain, Python is becoming increasingly popular despite being one of the least energy-efficient programming languages (PLs). Optimization is therefore essential to reduce energy consumption in both cases: (i) in the IoT, where despite the use of C, the large number of devices leads to high energy consumption, and (ii) in Python, due to its high energy consumption. This paper evaluates 23 optimization techniques in C and Python, taking into account the choice of compiler (O0/O3 in C and Interpreter/Nuitka in Python). The results show that more techniques have a positive impact (reducing energy) in Python than in C, but the energy consumption of Python remains significantly higher, requiring further optimizations to narrow the gap.
On the same topic
- 2026 Evaluating the Energy Efficiency of Optimization Techniques in C, Python, and Java
- 2025 Empirical Analysis of Python’s Energy Impact: Evidence from Real Measurements
- 2022 Analysing the energy impact of different optimisations for machine learning models
- 2025 Does the compiler or interpreter version influence the energy consumption of programming languages?