Finding Significant Differences in the Energy Consumption when Comparing Programming Languages and Programs

Lukas Koedijk, Ana Oprescu
{"title":"Finding Significant Differences in the Energy Consumption when Comparing Programming Languages and Programs","authors":"Lukas Koedijk, Ana Oprescu","doi":"10.1109/ict4s55073.2022.00012","DOIUrl":null,"url":null,"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.","PeriodicalId":437454,"journal":{"name":"2022 International Conference on ICT for Sustainability (ICT4S)","volume":"41 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 International Conference on ICT for Sustainability (ICT4S)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ict4s55073.2022.00012","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

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.
在比较编程语言和程序时发现能源消耗的显著差异
《欧盟绿色协议》反映了社会对气候变化的关注。在软件行业,这意味着减少程序的能耗。这可以通过查看所使用的硬件和软件来完成。我们采用软件方法,重点关注编程语言的选择以及如何编写计算机程序。我们研究的编程语言有Java、JavaScript、Python、PHP、Ruby、C、c++和c#。我们比较了计算机语言基准游戏中的程序,并将这些程序分成解决相同问题的组。我们发现编程语言的选择和编写程序的方式会影响能耗。在所有问题中消耗能量最少的编程语言是C和c++,尽管当编译标志最小化时,这些编程语言消耗的能量更多。然而,在某些情况下,我们无法证明在能源消耗方面存在差异。我们还发现用于运行程序的硬件对能耗有影响。我们发现程序的运行时间与能耗相关,但运行时间越短并不一定能耗越低。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信