一句话:通过 32 人用户实验发现,使用 GitHub Copilot 辅助写出的 C++ 代码运行时性能显著更慢。
GitHub Copilot 已被大量开发者用作 AI 编程助手,但已有研究多聚焦其安全风险,尚不清楚它是否能帮助开发者产出运行时性能更好的代码。本文针对 C++ 代码,比较开发者在使用与不使用 GitHub Copilot 两种条件下的运行时性能。作者开展了一项包含 32 名参与者的用户研究,每位参与者解决两道 C++ 编程题,一道借助 Copilot,另一道不借助,并在统一的测试数据上测量其解法运行时间。结果表明,使用 Copilot 时产出的 C++ 代码运行性能更慢,且该差异具有统计显著性。
GitHub Copilot is an artificially intelligent programming assistant used by many developers. While a few studies have evaluated the security risks of using Copilot, there has not been any study to show if it aids developers in producing code with better runtime performance. We evaluate the runtime performance of C++ code produced when developers use GitHub Copilot versus when they do not. To this end, we conducted a user study with 32 participants where each participant solved two C++ programming problems, one with Copilot and the other without it and measured the runtime performance of the participants' solutions on our test data. Our results suggest that using Copilot may produce$\mathbf{C + +}$code with (statistically significant) slower runtime performance.
DOI 原文 ·
@inproceedings{paperbot8758,
title = {Measuring the Runtime Performance of C++ Code Written by Humans Using Github Copilot},
author = {Daniel Erhabor and Sreeharsha Udayashankar and Meiyappan Nagappan and Samer Al-Kiswany},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00059}
}