Abstract

The increased use of software applications has resulted in a surge in energy demand, particularly in data centers and IT infrastructures. As global energy consumption is projected to surpass supply by 2030, the need to optimize energy consumption in programming has become imperative. Our study explores the energy efficiency of various coding patterns and techniques in Python, with the objective of guiding programmers to a more informed and energy-conscious coding practices. The research investigates the energy consumption of a comprehensive range of topics, including data initialization, access patterns, structures, string formatting, sorting algorithms, dynamic programming and performance comparisons between NumPy and Pandas, and personal computers versus cloud computing. The major findings of our research include the advantages of using efficient data structures, the benefits of dynamic programming in certain scenarios that saves up to 0.128J of energy, and the energy efficiency of NumPy over Pandas for numerical calculations. Additionally, the study also shows that assignment operator, sequential read, sequential write and string concatenation are 2.2 times, 1.05 times, 1.3 times and 1.01 times more energy-efficient choices, respectively, compared to their alternatives for data initialization, data access patterns, and string formatting. Our findings offer guidance for developers to optimize code for energy efficiency and inspire sustainable software development practices, contributing to a greener computing industry.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call