EnCoDe: Energy Estimation of Source Code At Design-Time
- URL: http://arxiv.org/abs/2605.00504v1
- Date: Fri, 01 May 2026 08:30:36 GMT
- Title: EnCoDe: Energy Estimation of Source Code At Design-Time
- Abstract summary: Energy efficiency has emerged as a vital attribute of software quality, with significant implications for both environmental sustainability and operational costs.<n>Existing profiling tools operate only at runtime and coarse granularity, typically capturing energy at the process or method level.<n>We propose EnCoDe, a methodology for fine-grained, design-time energy estimation.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Energy efficiency has emerged as a vital attribute of software quality, with significant implications for both environmental sustainability and operational costs. However, existing profiling tools operate only at runtime and coarse granularity, typically capturing energy at the process or method level. Such tools fail to expose how small code blocks, such as functions, loops, and conditionals, contribute to energy consumption, preventing developers from reasoning about and comparing the energy efficiency of programming constructs during design-time. To address this gap, we propose EnCoDe, a methodology for fine-grained, design-time energy estimation, with the following key contributions: (1) PowerLens, a novel measurement methodology that achieves reliable sub-millisecond energy readings for small code blocks; (2) Extensive empirical study on code blocks extracted from over 18,000 Python programs, uncovering linear and non-linear relationships between energy consumption and static code features such as structural, complexity, density, and contextual characteristics, resulting in a first-of-its-kind fine-grained dataset; and (3) Predictive modeling, in which machine learning models are trained on these features to accurately estimate and classify block-level energy consumption at design-time. Our results demonstrate stable, reproducible block-level estimations, with regressors achieving R^2 = 0.75 and classifiers achieving 80.6% accuracy in identifying energy hotspots, enabling developers to localize and address inefficient code regions early in the development process without execution.
Related papers
- Developer Attitudes and Practices Towards Optimizing Software Energy Consumption [9.378911615939925]
Energy consumption is explicitly considered in only a minority of projects.<n>More commonly, developers influence energy use indirectly by optimizing proxy properties such as execution time and CPU utilization.<n>We identify organizational disincentives, limited tooling, and educational gaps as major barriers to adoption.
arXiv Detail & Related papers (2026-08-31T09:57:36Z) - Static Metrics Are Insufficient: Predicting Java Method Energy Usage with Execution Time [4.1759895896406904]
Reasoning on energy usage early in the development flow has the potential to significantly reduce the overall energy usage of a software system.<n>Assessing energy usage without repeated profiling and direct measurement is difficult.<n>This study investigates the limits of method-level energy prediction in Java.
arXiv Detail & Related papers (2026-07-07T10:35:24Z) - Chiseling Out Efficiency: Structured Skeleton Supervision for Efficient Code Generation [61.72280804975896]
Large Language Models (LLMs) are capable of generating syntactically correct and functionally complete programs, greatly streamlining software development.<n>Existing approaches to bridging this efficiency gap typically involve either iteratively optimizing code after generation or fine-tuning models on corpora of efficient code.<n>EffiSkel is an efficiency skeleton-guided framework that explicitly extracts and learns efficiency skeletons-abstract, reusable structural patterns efficient code.
arXiv Detail & Related papers (2026-06-05T01:49:20Z) - Perspective: Towards sustainable exploration of chemical spaces with machine learning [49.29528647472741]
We argue that sustainable progress will rely on open data and models, reusable datasets, and domain-specific AI systems.<n>We highlight emerging strategies to enhance efficiency, including general-purpose machine learning (ML) models, multi-fidelity approaches, model distillation, and active learning.
arXiv Detail & Related papers (2026-03-31T13:29:20Z) - An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Code [46.879983975894135]
This study aims to investigate whether and how LLMs can be optimized to promote the generation of energy-efficient code.<n>CPT combines Contrastive Learning techniques, which help the model to distinguish between efficient and inefficient code.<n>This study evaluates CPT on Python, Java and C++ coding problems across three different models to provide a comprehensive evaluation.
arXiv Detail & Related papers (2026-03-03T12:36:15Z) - Sustainable Code Generation Using Large Language Models: A Systematic Literature Review [20.12025491042057]
Large Language Models (LLMs) are widely used in software engineering to generate, complete, translate, and fix code.<n>This paper examines existing research on the sustainability of code generated by LLMs.
arXiv Detail & Related papers (2026-03-01T08:32:36Z) - Towards Green AI: Decoding the Energy of LLM Inference in Software Development [46.879983975894135]
AI-assisted tools are increasingly integrated into software development, but their reliance on large language models (LLMs) introduces substantial computational and energy costs.<n>We conduct a phase-level analysis of LLM inference energy consumption, distinguishing between the (1) prefill, where the model processes the input and builds internal representations, and (2) decoding, where output tokens are generated using the stored state.
arXiv Detail & Related papers (2026-02-05T14:38:19Z) - Smart but Costly? Benchmarking LLMs on Functional Accuracy and Energy Efficiency [5.771786260272727]
We present a framework, BRACE, to benchmark Code Language Models on a unified scale of energy efficiency and functional correctness.<n>We propose two rating methods: Concentric Incremental Rating Circles (CIRC) and Observation to Expectation Rating (OTER)<n>Our analysis reveals models generally perform better in the code summarization tasks as they are not enforced to generate a grammar-based and syntactically correct output.
arXiv Detail & Related papers (2025-11-10T23:44:48Z) - Training Language Models to Generate Quality Code with Program Analysis Feedback [66.0854002147103]
Code generation with large language models (LLMs) is increasingly adopted in production but fails to ensure code quality.<n>We propose REAL, a reinforcement learning framework that incentivizes LLMs to generate production-quality code.
arXiv Detail & Related papers (2025-05-28T17:57:47Z) - A Safe Genetic Algorithm Approach for Energy Efficient Federated
Learning in Wireless Communication Networks [53.561797148529664]
Federated Learning (FL) has emerged as a decentralized technique, where contrary to traditional centralized approaches, devices perform a model training in a collaborative manner.
Despite the existing efforts made in FL, its environmental impact is still under investigation, since several critical challenges regarding its applicability to wireless networks have been identified.
The current work proposes a Genetic Algorithm (GA) approach, targeting the minimization of both the overall energy consumption of an FL process and any unnecessary resource utilization.
arXiv Detail & Related papers (2023-06-25T13:10:38Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.