Python Unplugged: A Comparative Study of Seven Energy-Efficient Coding Techniques
摘要
This research focuses on the impact of Python code optimisation techniques on energy usage and performance, with the goal of promoting sustainable software development. Given the growing worldwide emphasis on minimising energy consumption, it examines seven alternative programming techniques to identify the most energy-efficient practices. Through extensive experimentation, it was found that built-in functions, lazy evaluation, and caching are some of the leading solutions for optimising energy usage and performance in Python programming. The research revealed substantial variations in energy efficiency and performance by conducting experiments to evaluate the effectiveness of these techniques, providing essential insights for software developers. The study not only sets the foundation for future studies in energy-efficient Python programming, but it also paves the way for new methods, such as training an artificial intelligence (AI) model to predict the energy footprint of software programs before executing them.