Do Generative AI Tools Ensure Green Code? An Investigative Study
Sikand, Samarth, Mehra, Rohit, Sharma, Vibhu Saujanya, Kaulgud, Vikrant, Podder, Sanjay, Burden, Adam P.
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Jun-11-2025
- Country:
- Asia > India (0.05)
- Europe
- Denmark > Capital Region
- Copenhagen (0.04)
- Portugal > Lisbon
- Lisbon (0.05)
- Denmark > Capital Region
- North America > United States
- California > Santa Clara County
- Palo Alto (0.04)
- New York > New York County
- New York City (0.05)
- California > Santa Clara County
- South America > Brazil
- Genre:
- Research Report (1.00)
- Industry:
- Energy (0.97)
- Information Technology > Software (0.35)
- Technology: