How do code refactorings affect energy usage?
How do code refactorings affect energy usage?
复制标题
代码重构如何影响能源使用?
DOI:
10.1145/2652524.2652538
复制
发表时间:
2014
期刊:
影响因子:
--
通讯作者:
J. Clause
中科院分区:
文献类型:
--
作者:
C. Sahin;L. Pollock;J. Clause
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.