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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Evaluating Programming Optimization Techniques in C and Python: Impact on Energy Consumption

  • Carlos Pulido,
  • Félix O. García,
  • Mł Ángeles Moraga,
  • Coral Calero,
  • Miguel Baños-González,
  • 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.