Do Generative AI Tools Ensure Green Code? An Investigative Study

Samarth Sikand, Rohit Mehra, Vibhu Saujanya Sharma, Vikrant Kaulgud, Sanjay Podder +1 more
6/10/2025
cs.SEcs.AIcs.CY

No confident code implementation found for this paper.

Abstract

Software sustainability is emerging as a primary concern, aiming to optimize resource utilization, minimize environmental impact, and promote a greener, more resilient digital ecosystem. The sustainability or "greenness" of software is typically determined by the adoption of sustainable coding practices. With a maturing ecosystem around generative AI, many software developers now rely on these tools to generate code using natural language prompts. Despite their potential advantages, there is a significant lack of studies on the sustainability aspects of AI-generated code. Specifically, how environmentally friendly is the AI-generated code based upon its adoption of sustainable coding practices? In this paper, we present the results of an early investigation into the sustainability aspects of AI-generated code across three popular generative AI tools - ChatGPT, BARD, and Copilot. The results highlight the default non-green behavior of tools for generating code, across multiple rules and scenarios. It underscores the need for further in-depth investigations and effective remediation strategies.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sikand2025generative,
  title  = {Do Generative AI Tools Ensure Green Code? An Investigative Study},
  author = {Samarth Sikand and Rohit Mehra and Vibhu Saujanya Sharma and Vikrant Kaulgud and Sanjay Podder and Adam P. Burden},
  year   = {2025},
  eprint = {2506.08790},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.08790v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.08790.svg)](https://codeofpaper.com/paper/2506.08790)

Discussion