Abstract
Software is developed using programming languages whose choice is made based on a wide range of criteria, but it should be noted that the programming language selected can affect the quality of the software product. In this paper, we focus on analysing the differences in energy consumption when running certain algorithms that have been developed using different programming languages. Therefore, we focus on the software quality from the perspective of greenability, in concrete in the aspects related to energy efficiency. For this purpose, this study has conducted an empirical investigation about the most suitable programming languages from an energy efficiency perspective using a hardware-based consumption measurement instrument that obtains real data about energy consumption. The study builds upon a previous study in which energy efficiency of PL were ranked using a software-based approach where the energy consumption is an estimation. As a result, no significant differences are obtained between two approaches, in terms of ranking the PL. However, if it is required to have a more realistic knowledge of consumption, it is necessary to use hardware approaches. Furthermore, the hardware approach provides information about the energy consumption of specific DUT hardware components, such as, HDD, graphics card, and processor, and a ranking for each of component is elaborated. This can provide useful information to make a more informed decision on the choice of a PL, depending on several factors, such as the type of algorithms to be implemented, or the effects on power consumption not only in overall, but also depending on specific DUT hardware components.









Similar content being viewed by others
Data availability
No datasets were generated or analysed during the current study.
References
Andrae, A. S. (2019). Prediction Studies of Electricity Use of Global Computing in 2030. International Journal of Science and Engineering Investigations (IJSEI), 8, 27–33.
Basili, V. R., Selby, R. W., & Hutchens, D. H. (1986). Experimentation in Software Engineering. IEEE Transactions on Software Engineering, 12(7), 733–743.
Becker, C., Chitchyan, R., Duboc, L., Easterbrook, S., Penzenstadler, B., Seyff, N., & Venters, C. C. (2015). Sustainability design and software: The karlskrona manifesto. 2, 467–476. IEEE.
Bhattacharya, P., & Neamtiu, I. (2011). Assessing programming language impact on development and maintenance: A study on C and C++. 171–180.
Bissyandé, T. F., Thung, F., Lo, D., Jiang, L., & Réveillere, L. (2013). Popularity, interoperability, and impact of programming languages in 100,000 open source projects. 2013 IEEE 37th Annual Computer Software and Applications Conference, 303–312. IEEE.
Brooks, A., Daly, J. W., Miller, J., Roper, M., & Wood, M. I. (1996). Replication of experimental results in software engineering.
Cabot, J., Capilla, R., Carrillo, C., Muccini, H., & Penzenstadler, B. (2019). Measuring systems and architectures: A sustainability perspective. IEEE Software, 36(3), 98–100.
Calero, C., & Piattini, M. (2015). Green in software engineering (Vol. 3). Springer.
Calero, C., Moraga, M. Á., Bertoa, M. F., & Duboc, L. (2015). Green software and software quality. Green in Software Engineering, 231–260.
Choroszucho, A., Golonko, P., Bednarek, J., Sumorek, M., & Żukowski, J. (2019). Comparison of high-level programming languages efficiency in embedded systems. 11176, 1800–1808. SPIE.
Chowdhury, S. A., & Hindle, A. (2016). Greenoracle: Estimating software energy consumption with energy measurement corpora. 49–60.
Chowdhury, S., Borle, S., Romansky, S., & Hindle, A. (2019). Greenscaler: Training software energy models with automatic test generation. Empirical Software Engineering, 24, 1649–1692.
Cohen, J. (2013). Statistical power analysis for the behavioral sciences. Routledge.
Corral-García, J., Lemus-Prieto, F., & Pérez-Toledano, M. -Á. (2021). Efficient code development for improving execution performance in high-performance computing centers. The Journal of Supercomputing, 77(4), 3261–3288.
Cruz, L., Abreu, R., Grundy, J., Li, L., & Xia, X. (2019). Do energy-oriented changes hinder maintainability? 29–40. IEEE.
Dirlewanger, W. (2006). Measurement and rating of computer systems performance and of software efficiency: An introduction to the ISO/IEC 14756 method and a guide to its application. Kassel University Press Kassel.
Fonseca, A., Kazman, R., & Lago, P. (2019). A manifesto for energy-aware software. IEEE Software, 36(6), 79–82.
García-Mireles, G. A., Moraga, M. Á., García, F., Calero, C., & Piattini, M. (2018). Interactions between environmental sustainability goals and software product quality: A mapping study. Information and Software Technology, 95, 108–129.
Georgiou, S., Kechagia, M., Louridas, P., & Spinellis, D. (2018). What are your programming language’s energy-delay implications? 303–313.
Gordillo, A., Calero, C., Moraga, M. Á., García, F., Fernandes, J. P., Abreu, R., & Saraiva, J. (2024). Repository of programming languages ranking based on energy measurements. Retrieved from Repository of Programming Languages Ranking based on Energy Measurements website: https://github.com/GrupoAlarcos/Programming-Languages-Ranking-based-on-Energy--Measurements
Guamán, D., & Pérez, J. (2021). Supporting Sustainability and Technical Debt-Driven Design Decisions in Software Architectures.
Hanenberg, S. (2010). An experiment about static and dynamic type systems: Doubts about the positive impact of static type systems on development time. 22–35.
Harrison, R., Samaraweera, L., Dobie, M. R., & Lewis, P. H. (1996). Comparing programming paradigms: An evaluation of functional and object-oriented programs. Software Engineering Journal, 11(4), 247–254.
IEC, I. (2011). ISO/IEC 25010: System and Software engineering-System and software Quality Requirements and Evaluation (SQuaRE)-System and software quality models. Switzerland: ISO.
Jedlitschka, A., & Pfahl, D. (2005). Reporting guidelines for controlled experiments in software engineering. 2005 International Symposium on Empirical Software Engineering, ISESE 2005, 10 pp.-. https://doi.org/10.1109/ISESE.2005.1541818
Kelefouras, V., & Djemame, K. (2019). A methodology correlating code optimizations with data memory accesses, execution time and energy consumption. The Journal of Supercomputing, 75(10), 6710–6745.
Kern, E., Hilty, L. M., Guldner, A., Maksimov, Y. V., Filler, A., Gröger, J., & Naumann, S. (2018). Sustainable software products—Towards assessment criteria for resource and energy efficiency. Future Generation Computer Systems, 86, 199–210.
Kleinschmager, S., Robbes, R., Stefik, A., Hanenberg, S., & Tanter, E. (2012). Do static type systems improve the maintainability of software systems? An empirical study. 153–162. IEEE.
Koch, C., Müller, K., & Sultanow, E. (2022). Which programming languages do hackers use? A survey at the German Chaos Computer Club. arXiv Preprint arXiv:2203.12466
Kochhar, P. S., Wijedasa, D., & Lo, D. (2016). A large scale study of multiple programming languages and code quality. 1, 563–573. IEEE.
Li, D., & Halfond, W. G. (2014). An investigation into energy-saving programming practices for android smartphone app development. 46–53.
Lima, L. G., Soares-Neto, F., Lieuthier, P., Filho, F. C., Melfe, G., & Fernandes, J. P. (2016). Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional Language. 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), 1, 517–528.
Mancebo, J., Calero, C., & García, F. (2021a). Does maintainability relate to the energy consumption of software? A Case Study. Software Quality Journal, 29(1), 101–127.
Mancebo, J., Calero, C., Garcia, F., Moraga, M. A., & de Guzman, I.G.-R. (2021b). FEETINGS: Framework for Energy Efficiency Testing to Improve Environmental Goal of the Software. Sustainable Computing: Informatics and Systems, 30, 100558. https://doi.org/10.1016/j.suscom.2021.100558
Manotas, I., Bird, C., Zhang, R., Shepherd, D., Jaspan, C., Sadowski, C., . . . Clause, J. (2016). An empirical study of practitioners’ perspectives on green software engineering. 237–248.
Meyerovich, L. A., & Rabkin, A. S. (2013). Empirical analysis of programming language adoption. 1–18.
Muna, A. (2022). Assessing programming language impact on software development productivity based on mining oss repositories. ACM SIGSOFT Software Engineering Notes, 44(1), 36–38.
Murtagh, F., & Legendre, P. (2011). Ward’s hierarchical clustering method: Clustering criterion and agglomerative algorithm. arXiv Preprint arXiv:1111.6285
Naumann, S., Dick, M., Kern, E., & Johann, T. (2011). The GREENSOFT Model: A reference model for green and sustainable software and its engineering. Sustainable Computing: Informatics and Systems, 1(4), 294–304.
OMG. (2008). Software process engineering metamodel 2.0. Retrieved from Software process engineering metamodel 2.0 website: https://www.omg.org/spec/SPEM/2.0/About-SPEM
Pang, C., Hindle, A., Adams, B., & Hassan, A. E. (2015). What do programmers know about software energy consumption? IEEE Software, 33(3), 83–89.
Pankratius, V., Schmidt, F., & Garretón, G. (2012). Combining functional and imperative programming for multicore software: An empirical study evaluating Scala and Java. 123–133. IEEE.
Penzenstadler, B., Raturi, A., Richardson, D., Calero, C., Femmer, H., & Franch, X. (2014). Systematic mapping study on software engineering for sustainability (SE4S). 1–14.
Pereira, R., Couto, M., Saraiva, J., Cunha, J., & Fernandes, J. P. (2016). The Influence of the Java Collection Framework on Overall Energy Consumption. Proceedings of the 5th International Workshop on Green and Sustainable Software, 15–21. New York, NY, USA: Association for Computing Machinery. https://doi.org/10.1145/2896967.2896968
Pereira, R., Couto, M., Ribeiro, F., Rua, R., Cunha, J., Fernandes, J. P., & Saraiva, J. (2017). Energy efficiency across programming languages: How do energy, time, and memory relate? (pp. 256–267). Association for Computing Machinery.
Pereira, R., Carção, T., Couto, M., Cunha, J., Fernandes, J. P., & Saraiva, J. (2020). SPELLing out energy leaks: Aiding developers locate energy inefficient code. Journal of Systems and Software, 161, 110463.
Pereira, R., Couto, M., Ribeiro, F., Rua, R., Cunha, J., Fernandes, J. P., & Saraiva, J. (2021). Ranking programming languages by energy efficiency. Science of Computer Programming, 205, 102609.
Pinto, G., & Castor, F. (2017). Energy efficiency: A new concern for application software developers. Communications of the ACM, 60(12), 68–75.
Ray, B., Posnett, D., Filkov, V., & Devanbu, P. (2014). A large scale study of programming languages and code quality in github. 155–165.
Rosetta code. (n.d.). Retrieved 21 December 2022 from https://rosettacode.org/wiki/Rosetta_Code
Solari, M., Vegas, S., & Juristo, N. (2018). Content and structure of laboratory packages for software engineering experiments. Information and Software Technology, 97, 64–79. https://doi.org/10.1016/j.infsof.2017.12.016
The computer language benchmarks game. (n.d.). Retrieved 21 December 2022, from https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html
Venters, C. C., Jay, C., Lau, L., Griffiths, M. K., Holmes, V., Ward, R. R., . . . Xu, J. (2014). Software sustainability: The modern tower of babel. 1216, 7–12. CEUR.
Vidal, J. (2017). Tsunami of data’could consume one fifth of global electricity by 2025’. Climate Home News, 11.
Wohlin, C., Runeson, P., Höst, M., Ohlsson, M. C., Regnell, B., & Wesslén, A. (2012). Experimentation in software engineering. Springer Science & Business Media.
Yang, H., Nong, Y., Wang, S., & Cai, H. (2024). Multi-Language Software Development: Issues, Challenges, and Solutions. IEEE Transactions on Software Engineering.
Acknowledgements
The work has received support from the following projects: OASSIS (PID2021-122554OB-C31/ AEI/10.13039/ 501100011033/FEDER, UE); EMMA (Project SBPLY/21/180501/000115, funded by CECD (JCCM) and FEDER funds); SEEAT (PDC2022-133249-C31 funded by MCIN/AEI/ https://doi.org/10.13039/501100011033 and European Union NextGenerationEU/PRTR); PLAGEMIS (TED2021-129245B-C22 funded by MCIN/AEI/ https://doi.org/10.13039/501100011033 and European Union NextGenerationEU/PRTR). Financial support for the execution of applied research projects, within the framework of the UCLM Own Research Plan, co-financed at 85% by the European Regional Development Fund (FEDER) UNION (2022-GRIN-34110).
Author information
Authors and Affiliations
Contributions
The planning of the comparison was carried out by Alberto Gordillo, Coral Calero, Mª Moraga, Félix García, João Paulo Fernandes, Rui Abreu, and João Saraiva. The preparation of the replication was conducted by Alberto Gordillo, Coral Calero, Mª Moraga, and Félix García. The experiment execution was performed by Alberto Gordillo. The manuscript was written by Alberto Gordillo, Coral Calero, Mª Moraga, and Félix García. Finally, the comparison of the studies and the review of both the experiment and the manuscript were conducted by Alberto Gordillo, Coral Calero, Mª Moraga, Félix García, João Paulo Fernandes, Rui Abreu, and João Saraiva.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A
Appendix B
Figure 10 shows the clusters of the programming languages for each algorithm, using Ward's method
Appendix C
Figures 11, 12 and 13 show the clusters identified based on the energy consumed by the hard disk, graphics card and processor respectively. Figure 11 HDD clusters by algorithm Fig. 12 Graphics Card clusters by algorithm.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Gordillo, A., Calero, C., Moraga, M.Á. et al. Programming languages ranking based on energy measurements. Software Qual J 32, 1539–1580 (2024). https://doi.org/10.1007/s11219-024-09690-4
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11219-024-09690-4