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

Lecture Notes in Business Information Processing · 2025 · 1 citations (OpenAlex)

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.

View on the group website DOI: 10.1007/978-3-031-92471-2_12

On the same topic