Pith. sign in

REVIEW 2 cited by

Generating Energy-efficient code with LLMs

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2411.10599 v2 pith:27K2IW4O submitted 2024-11-15 cs.SE cs.AI

classification cs.SEcs.AI
keywords codeconsumptionenergypromptpythondifferentgeneratedlanguage
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

The increasing electricity demands of personal computers, communication networks, and data centers contribute to higher atmospheric greenhouse gas emissions, which in turn lead to global warming and climate change. Therefore the energy consumption of code must be minimized. Code can be generated by large language models. We look at the influence of prompt modification on the energy consumption of the code generated. We use three different Python code problems of varying difficulty levels. Prompt modification is done by adding the sentence ``Give me an energy-optimized solution for this problem'' or by using two Python coding best practices. The large language models used are CodeLlama-70b, CodeLlama-70b-Instruct, CodeLlama-70b-Python, DeepSeek-Coder-33b-base, and DeepSeek-Coder-33b-instruct. We find a decrease in energy consumption for a specific combination of prompt optimization, LLM, and Python code problem. However, no single optimization prompt consistently decreases energy consumption for the same LLM across the different Python code problems.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Integrating Energy Efficiency into Software Development: Developer Perspectives and Requirements

    cs.SE 2026-07 conditional novelty 6.0 of 10

    Developers rarely consider energy efficiency explicitly, and AI-assisted green-coding tools will be accepted only if they provide actionable, explainable suggestions, integrate into existing workflows, and prove net e...

  2. Evaluating the Energy-Efficiency of the Code Generated by LLMs

    cs.SE 2025-05 conditional novelty 5.0 of 10

    LLM-generated Python solutions typically consume more energy than canonical human-written solutions, with DeepSeek-v3 and GPT-4o the most efficient LLMs and worst-case gaps near 450 times on certain problems.

Pith tools