With the escalating urgency to combat climate change, energy consumption in software development has become a significant concern. Leveraging AI-driven techniques, particularly in code refactoring, has the potential to optimize software for reduced energy consumption and environmental impact. How effective is an AI-driven code refactoring tool in reducing software-related carbon emissions, and what measures can enhance its impact on mitigating climate change? By using chatGPT 3.5 for code refactoring, verifying the results, and measuring the carbon emissions and runtime of each file, that question is answered. Improvements are found in both runtime and carbon emissions. Furthermore, a linear relationship between runtime and carbon emissions was confirmed. Machine learning (ML) code examples improved on average by 45% for runtime, and 47% for carbon emissions. While non-ML examples improved on average by 24% for runtime, and 28% for carbon emissions. The positive results demonstrate that it is effective to use AI-driven code refactoring to reduce carbon emissions produced by software development.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Using AI-Driven Code Refactoring to Reduce Carbon Emissions of Software Development

  • Zina Abohaia

摘要

With the escalating urgency to combat climate change, energy consumption in software development has become a significant concern. Leveraging AI-driven techniques, particularly in code refactoring, has the potential to optimize software for reduced energy consumption and environmental impact. How effective is an AI-driven code refactoring tool in reducing software-related carbon emissions, and what measures can enhance its impact on mitigating climate change? By using chatGPT 3.5 for code refactoring, verifying the results, and measuring the carbon emissions and runtime of each file, that question is answered. Improvements are found in both runtime and carbon emissions. Furthermore, a linear relationship between runtime and carbon emissions was confirmed. Machine learning (ML) code examples improved on average by 45% for runtime, and 47% for carbon emissions. While non-ML examples improved on average by 24% for runtime, and 28% for carbon emissions. The positive results demonstrate that it is effective to use AI-driven code refactoring to reduce carbon emissions produced by software development.