Abstract
The EU Green Deal mirrors the societal concern regarding climate change. In the software industry this means reducing the energy consumption of a program. This can be done by looking both at the hardware and the software used. We take a software approach and focus on the programming language choices and how a computer program is written. The programming languages we investigate are Java, JavaScript, Python, PHP, Ruby, C, C++ and C#. We compare programs from The Computer Language Benchmarks Game and these programs are divided in groups that solve the same problem.We find that the choice of programming language and the way of writing your program influences the energy consumption. The programming languages that consume the least amount of energy over all the problems are C and C++, albeit these programming languages consume more energy when compilation flags are minimized. However, in some cases we could not prove that there was a difference in the energy consumption. We also find that the hardware used to run the programs has an influence on the energy consumption. We find that the runtime of a program correlates with the energy consumption, but a shorter runtime does not necessarily result in a lower energy consumption.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.