HackerPapers

arXiv:2410.05460cs.PL

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

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

Abstract

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.

arXiv comments
12 pages, to appear at ASE'25
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.PFPerformance

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Sep 2025 to Jan 2026. Found in 3 HN submissions from Oct 2024 to Sep 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

  1. Is Rust faster than C? 1 comment
    • According to [1], the most important factor for the power consumption of code is how long the code takes to run. Code that spreads over multiple cores is generally more power efficient than code that runs sequentially, because the power consumption of multiple cores grows less…

      MrJohzView on HNParent context

    • Not easy being green: On the energy efficiency of programming languages (2024) https://arxiv.org/pdf/2410.05460 https://news.ycombinator.com/item?id=45304656

      1vuio0pswjnm7View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.