Do Generative AI Tools Ensure Green Code? An Investigative Study

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Sikand, Samarth, Mehra, Rohit, Sharma, Vibhu Saujanya, Kaulgud, Vikrant, Podder, Sanjay, Burden, Adam P.
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918053172740096
author Sikand, Samarth
Mehra, Rohit
Sharma, Vibhu Saujanya
Kaulgud, Vikrant
Podder, Sanjay
Burden, Adam P.
author_facet Sikand, Samarth
Mehra, Rohit
Sharma, Vibhu Saujanya
Kaulgud, Vikrant
Podder, Sanjay
Burden, Adam P.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_08790
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Do Generative AI Tools Ensure Green Code? An Investigative Study
Sikand, Samarth
Mehra, Rohit
Sharma, Vibhu Saujanya
Kaulgud, Vikrant
Podder, Sanjay
Burden, Adam P.
Software Engineering
Artificial Intelligence
Computers and Society
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.
title Do Generative AI Tools Ensure Green Code? An Investigative Study
topic Software Engineering
Artificial Intelligence
Computers and Society
url https://arxiv.org/abs/2506.08790