This study empirically investigates the use of GitHub Copilot in developing energy-efficient software and the associated trade-offs. We compare the energy consumption and performance of human-written code to (i) the human-written code optimized by using GitHub Copilot, and (ii) code generated by GitHub Copilot. A set of 15 programming scenarios is used to test our hypothesis. GitHub Copilot is prompted for energy-efficient solutions. Our results demonstrate that GitHub Copilot-generated code can achieve significantly lower energy consumption when optimized, without compromising code quality. The study did not find statistically significant differences in energy consumption compared to human-written code. However, it highlights the potential of AI-assisted coding tools such as GitHub Copilot for developing energy-efficient software and the importance of explicitly prompting for energy consumption.

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

Investigating the Use of GitHub Copilot for Green Software

  • Maria Stivala,
  • Iffat Fatima,
  • Patricia Lago

摘要

This study empirically investigates the use of GitHub Copilot in developing energy-efficient software and the associated trade-offs. We compare the energy consumption and performance of human-written code to (i) the human-written code optimized by using GitHub Copilot, and (ii) code generated by GitHub Copilot. A set of 15 programming scenarios is used to test our hypothesis. GitHub Copilot is prompted for energy-efficient solutions. Our results demonstrate that GitHub Copilot-generated code can achieve significantly lower energy consumption when optimized, without compromising code quality. The study did not find statistically significant differences in energy consumption compared to human-written code. However, it highlights the potential of AI-assisted coding tools such as GitHub Copilot for developing energy-efficient software and the importance of explicitly prompting for energy consumption.