Towards a Green Ranking for Programming Languages

While in the past the primary goal to optimize software was the run time optimization, nowadays there is a growing awareness of the need to reduce energy consumption. Additionally, a growing number of developers wish to become more energy-aware when programming and feel a lack of tools and the knowledge to do so. In this paper we define a ranking of energy efficiency in programming languages. We consider a set of computing problems implemented in ten well-known programming languages, and monitored the energy consumed when executing each language. Our preliminary results show that although the fastest languages tend to be the lowest consuming ones, there are other interesting cases where slower languages are more energy efficient than faster ones.

[1]  Jácome Cunha,et al.  Helping Programmers Improve the Energy Efficiency of Source Code , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C).

[2]  Efraim Rotem,et al.  Power-Management Architecture of the Intel Microarchitecture Code-Named Sandy Bridge , 2012, IEEE Micro.

[3]  Sam Tobin-Hochstadt,et al.  Optimization coaching: optimizers learn to communicate with programmers , 2012, OOPSLA '12.

[4]  Anne E. Trefethen,et al.  Energy-aware software: Challenges, opportunities and strategies , 2013, J. Comput. Sci..

[5]  Hermann Härtig,et al.  Measuring energy consumption for short code paths using RAPL , 2012, PERV.

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

[7]  Shengchao Qin,et al.  Memory Usage Verification for OO Programs , 2005, SAS.

[8]  Ding Li,et al.  Integrated energy-directed test suite optimization , 2014, ISSTA 2014.

[9]  Qijun Gu,et al.  Using the Greenup, Powerup, and Speedup metrics to evaluate software energy efficiency , 2015, 2015 Sixth International Green and Sustainable Computing Conference (IGSC).

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

[11]  William G. J. Halfond,et al.  How Does Code Obfuscation Impact Energy Usage? , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[12]  Gabriele Bavota,et al.  Mining energy-greedy API usage patterns in Android apps: an empirical study , 2014, MSR 2014.

[13]  Alireza Sadeghi,et al.  Energy-aware test-suite minimization for Android apps , 2016, ISSTA.

[14]  João Paulo Fernandes,et al.  Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional Language , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[15]  William J. Kaiser,et al.  Energy-Efficient Sensing with the Low Power, Energy Aware Processing (LEAP) Architecture , 2012, TECS.

[16]  Gustavo Pinto,et al.  A Comprehensive Study on the Energy Efficiency of Java’s Thread-Safe Collections , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[17]  Jeremy Singer,et al.  JVM-hosted languages: they talk the talk, but do they walk the walk? , 2013, PPPJ.

[18]  Michael Frank,et al.  JetsonLeap: A Framework to Measure Energy-Aware Code Optimizations in Embedded and Heterogeneous Systems , 2016, SBLP.

[19]  Jácome Cunha,et al.  The Influence of the Java Collection Framework on Overall Energy Consumption , 2016, 2016 IEEE/ACM 5th International Workshop on Green and Sustainable Software (GREENS).

[20]  Andrei Homescu,et al.  HappyJIT: a tracing JIT compiler for PHP , 2011, DLS '11.

[21]  Jácome Cunha,et al.  Detecting Anomalous Energy Consumption in Android Applications , 2014, SBLP.

[22]  Tomofumi Yuki,et al.  Folklore Confirmed: Compiling for Speed = Compiling for Energy , 2013, LCPC.

[23]  T. Cook,et al.  Quasi-experimentation: Design & analysis issues for field settings , 1979 .

[24]  McIntireDustin,et al.  Energy-Efficient Sensing with the Low Power, Energy Aware Processing (LEAP) Architecture , 2012 .

[25]  Gustavo Pinto,et al.  Mining questions about software energy consumption , 2014, MSR 2014.

[26]  Ramesh Govindan,et al.  Calculating source line level energy information for Android applications , 2013, ISSTA.

[27]  Jan Vitek,et al.  Evaluating the Design of the R Language - Objects and Functions for Data Analysis , 2012, ECOOP.

[28]  Lei Yang,et al.  Accurate online power estimation and automatic battery behavior based power model generation for smartphones , 2010, 2010 IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS).

[29]  Abram Hindle,et al.  Energy Profiles of Java Collections Classes , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[30]  Gustavo Pinto,et al.  Understanding energy behaviors of thread management constructs , 2014, OOPSLA 2014.

[31]  David Gregg,et al.  Dynamic interpretation for dynamic scripting languages , 2010, CGO '10.

[32]  Kerstin Eder,et al.  Static analysis of energy consumption for LLVM IR programs , 2014, SCOPES.

[33]  Gustavo Pinto,et al.  Data-Oriented Characterization of Application-Level Energy Optimization , 2015, FASE.

[34]  Lori L. Pollock,et al.  How do code refactorings affect energy usage? , 2014, ESEM '14.