How do code refactorings affect energy usage?

Context: Code refactoring's benefits to understandability, maintainability and extensibility are well known enough that automated support for refactoring is now common in IDEs. However, the decision to apply such transformations is currently performed without regard to the impacts of the refactorings on energy consumption. This is primarily due to a lack of information and tools to provide such relevant information to developers. Unfortunately, concerns about energy efficiency are rapidly becoming a high priority concern in many environments, including embedded systems, laptops, mobile devices, and data centers. Goal: We aim to address the lack of information about the energy efficiency impacts of code refactorings. Method: We conducted an empirical study to investigate the energy impacts of 197 applications of 6 commonly-used refactorings. Results: We found that refactorings can not only impact energy usage but can also increase and decrease the amount of energy used by an application. In addition, we also show that metrics commonly believed to correlate with energy usage are unlikely to be able to fully predict the impact of applying a refactoring. Conclusion: The results from this and similar studies could be used to augment IDEs to help software developers build more energy efficient software.

[1]  Miryung Kim,et al.  An empirical investigation into the role of API-level refactorings during software evolution , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[2]  Bill Tomlinson,et al.  Toward sustainable software engineering: NIER track , 2011, International Conference on Software Engineering.

[3]  Lori L. Pollock,et al.  Investigating the impacts of web servers on web application energy usage , 2013, 2013 2nd International Workshop on Green and Sustainable Software (GREENS).

[4]  Suman Roychoudhury,et al.  Choosing the "Best" Sorting Algorithm for Optimal Energy Consumption , 2009, ICSOFT.

[5]  Alexander Chatzigeorgiou,et al.  Energy Consumption Analysis of Design Patterns , 2007 .

[6]  Lori L. Pollock,et al.  Initial explorations on design pattern energy usage , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[7]  Zhenchang Xing,et al.  Refactoring Practice: How it is and How it Should be Supported - An Eclipse Case Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[8]  Christian Bunse,et al.  On the Energy Consumption of Design Patterns , 2013, Softwaretechnik-Trends.

[9]  Ming Zhang,et al.  Where is the energy spent inside my app?: fine grained energy accounting on smartphones with Eprof , 2012, EuroSys '12.

[10]  Lam H. Nguyen,et al.  Stereo matching: performance study of two global algorithms , 2011, Defense + Commercial Sensing.

[11]  Mahmut T. Kandemir,et al.  Using complete machine simulation for software power estimation: the SoftWatt approach , 2002, Proceedings Eighth International Symposium on High Performance Computer Architecture.

[12]  F. Kiamilev,et al.  Towards power reduction through improved software design , 2012, 2012 IEEE Energytech.

[13]  Bill Tomlinson,et al.  Green tracker: a tool for estimating the energy consumption of software , 2010, CHI Extended Abstracts.

[14]  Ramesh Govindan,et al.  Estimating Android applications' CPU energy usage via bytecode profiling , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[15]  Andrew P. Black,et al.  How We Refactor, and How We Know It , 2012, IEEE Trans. Software Eng..

[16]  Lionel C. Briand,et al.  A practical guide for using statistical tests to assess randomized algorithms in software engineering , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[17]  Ramesh Govindan,et al.  Estimating mobile application energy consumption using program analysis , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[18]  William J. Kaiser,et al.  The Atom LEAP Platform For Energy-Efficient Embedded Computing , 2010 .

[19]  Romain Rouvoy,et al.  A preliminary study of the impact of software engineering on GreenIT , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[20]  Margaret Martonosi,et al.  Wattch: a framework for architectural-level power analysis and optimizations , 2000, Proceedings of 27th International Symposium on Computer Architecture (IEEE Cat. No.RS00201).

[21]  Bill Tomlinson,et al.  Toward sustainable software engineering: NIER track , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[22]  A. Vargha,et al.  A Critique and Improvement of the CL Common Language Effect Size Statistics of McGraw and Wong , 2000 .

[23]  W. D. D. Silva,et al.  Evaluation of the impact of code refactoring on embedded software efficiency , 2010 .