paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generating Energy-Efficient Code via Large-Language Models - Where are we now?

利用大语言模型生成高能效代码:现状如何?
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 2/10 · 该论文主题是LLM生成代码的能耗实证比较,属于LLM代码生成与绿色软件方向,与用户核心关注的静态分析、Agentic程序分析、浮点/贝叶斯程序分析及LLM改进静态分析均无直接关联;同时其研究目标偏向评估LLM自身生成能力,而非将LLM作为工具服务于PL/形式化验证。引用 10 inbox
Radu Apsan, Vincenzo Stoico, Michel Albonico, Rudra Dhar, Karthik Vaidhyanathan, Ivano Malavolta
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:实证比较LLM生成、人类与绿色软件专家编写的Python代码能耗,专家代码始终更节能。

该研究评估大语言模型(LLM)生成 Python 代码的能效。作者在 EvoEval 基准的 9 个编程问题上,用 6 个主流 LLM 和 4 种提示技术生成 363 个解法,并与普通人类开发者及绿色软件专家的代码对比。能耗在服务器、PC 和 Raspberry Pi 三类硬件上测量,总计约 881 小时。结果显示:人类解法在服务器和 Raspberry Pi 上分别比 LLM 节能 16% 和 3%,而在 PC 上 LLM 比人类开发者节能 25%;提示技术未稳定节能,最节能提示因硬件而异;绿色软件专家代码在所有平台均比所有 LLM 至少节能 17% 至 30%。结论是 LLM 生成的代码尚不如人类专家节能,开发高能效 Python 代码仍需人类专业知识。

问题
LLM 已被广泛用于开发流程,但其生成的 Python 代码在能耗上是否优于人类开发者或绿色软件专家尚不明确。
方法
在 EvoEval 的 9 个编程问题上,使用 6 个主流 LLM 与 4 种提示技术生成 363 个 Python 解法,并与人类及绿色软件专家的代码进行能耗对比。
评估
在服务器、PC 和 Raspberry Pi 三类硬件平台上共计测量约 881 小时能耗,比较不同 LLM、提示技术与人类代码的能效差异。
原文摘要(Abstract)

Context. The rise of Large Language Models (LLMs) has led to their widespread adoption in development pipelines. Goal. We empirically assess the energy efficiency of Python code generated by LLMs against human-written code and code developed by a Green software expert. Method. We test 363 solutions to 9 coding problems from the EvoEval benchmark using 6 widespread LLMs with 4 prompting techniques, and comparing them to human-developed solutions. Energy consumption is measured on three different hardware platforms: a server, a PC, and a Raspberry Pi for a total of ≈ 881h (36.7 days). Results. Human solutions are 16% more energy-efficient on the server and 3% on the Raspberry Pi, while LLMs outperform human developers by 25% on the PC. Prompting does not consistently lead to energy savings, where the most energy-efficient prompts vary by hardware platform. The code developed by a Green software expert is consistently more energy-efficient by at least 17% to 30% against all LLMs on all hardware platforms. Conclusions. Even though LLMs exhibit relatively good code generation capabilities, no LLM-generated code was more energy-efficient than that of an experienced Green software developer, suggesting that as of today there is still a great need of human expertise for developing energy-efficient Python code.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2509-10099,
  title = {Generating Energy-Efficient Code via Large-Language Models - Where are we now?},
  author = {Radu Apsan and Vincenzo Stoico and Michel Albonico and Rudra Dhar and Karthik Vaidhyanathan and Ivano Malavolta},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3764522}
}