arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.05460cs.PLcs.PF
收藏

“绿色”并非易事:关于编程语言的能源效率研究

It's Not Easy Being Green: On the Energy Efficiency of Programming Languages

University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校);Amazon Web Services(亚马逊云服务)

Nicolas van Kempen, Hyuk-Je Kwon, Dung Tuan Nguyen, Emery D. Berger

AI总结:

针对编程语言选择与能耗的因果误解,研究构建因果模型纳入被忽视的关键影响因素,经实验验证控制这些因素后既有研究的能耗差异消失,指出语言实现对能耗无超出执行时间的显著影响。

摘要:

编程语言的选择会影响能源消耗吗?此前备受关注的研究已建立起特定编程语言与能源消耗之间的关联。对这项工作的因果误解,已导致学术界和行业领导者基于所谓的能源消耗影响,去使用或支持特定语言。本文直接探讨这一因果问题:构建了一个详尽的因果模型,用以刻画编程语言选择与能源消耗之间的复杂关系。该模型识别并纳入了数个影响能源使用、但此前被忽视的关键因素。这些因素包括区分编程语言与其实现、应用程序实现本身的影响、活跃核心数以及内存活动,若不加以考量,会显著扭曲能源消耗的测量结果。我们通过实证实验、改进的方法论以及对异常现象的细致研究表明,当控制这些因素后,先前研究中显著的差异便消失了。我们的分析显示,编程语言实现的选择除执行时间外,对能源消耗没有显著影响。

英文摘要:

Does the choice of programming language affect energy consumption? Previous highly visible studies have established associations between certain programming languages and energy consumption. A causal misinterpretation of this work has led academics and industry leaders to use or support certain languages based on their claimed impact on energy consumption. This paper tackles this causal question directly: it develops a detailed causal model capturing the complex relationship between programming language choice and energy consumption. This model identifies and incorporates several critical but previously overlooked factors that affect energy usage. These factors, such as distinguishing programming languages from their implementations, the impact of the application implementations themselves, the number of active cores, and memory activity, can significantly skew energy consumption measurements if not accounted for. We show -- via empirical experiments, improved methodology, and careful examination of anomalies -- that when these factors are controlled for, notable discrepancies in prior work vanish. Our analysis suggests that the choice of programming language implementation has no significant impact on energy consumption beyond execution time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑