← Latest papers
💻 computer science

Measuring Code Level Determinants of Software Sustainability: A Systematic Literature Review

This systematic literature review of 137 studies synthesizes code-level determinants and metrics for software sustainability, revealing a significant research gap in carbon measurement compared to energy, and proposes a grounded decision framework and actionable guidelines to help developers build greener software.

Original authors: Zoya Mahboob, Atif Jilani, Qurrat Ul Ain

Published 2026-10-22
📖 5 min read🧠 Deep dive

Original authors: Zoya Mahboob, Atif Jilani, Qurrat Ul Ain

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Every time a software program runs, from the app on a smartphone to the massive systems managing global cloud services, it draws power from the electrical grid. This consumption is not just a matter of cost; it is a direct contributor to the carbon emissions that warm the planet. While the data centers housing these systems are well-known for their energy demands, the software itself—the lines of code written by developers—plays a hidden but decisive role in how much electricity is used. Just as a car's engine design dictates its fuel efficiency, the specific choices made when writing code determine how much energy a program requires to function. Some choices are efficient, while others waste power without the user ever knowing.

For years, researchers have studied how to make software greener, but the evidence has been scattered across thousands of papers, often using different methods to measure the same things. A new systematic review, published by researchers at the National University of Computer and Emerging Sciences in Pakistan, brings this fragmented knowledge together. By analyzing 137 peer-reviewed studies published between late 2015 and early 2026, the team created a clear map of exactly which coding decisions matter most for sustainability. They found that while the field has grown rapidly, it has largely focused on measuring energy consumption, leaving a significant gap in measuring the resulting carbon emissions, even as regulations begin to demand carbon accounting.

The researchers began by sorting the vast amount of existing literature into a structured system. They identified two main categories of information: the specific choices developers make, known as determinants, and the ways those choices are measured, known as impact metrics. The determinants range from the broad, such as the choice of programming language or the algorithm used to solve a problem, to the granular, such as how data is stored in memory or how loops are written. The metrics are the tools used to see the effect of these choices, primarily measuring how much energy is used or how long a task takes. The team organized these findings to show when in the software development process these decisions are made and when their effects are actually observed.

One of the most striking findings concerns the sheer scale of impact that high-level decisions can have. The review confirms that the choice of programming language is a dominant factor. Studies consistently show that compiled languages, which are translated directly into machine code, can be up to twenty times more energy-efficient than interpreted languages, which are processed line-by-line while running. Similarly, the choice of algorithm—the mathematical recipe a program follows—can create massive differences in energy use. A more efficient algorithm can reduce energy consumption by orders of magnitude, a difference so large that no amount of minor code tweaking can ever match it. Despite this, the review notes that these high-impact decisions are not the most frequently studied topics in the literature; researchers have spent more time examining smaller, less impactful details like specific coding styles or minor optimizations.

The study also mapped out when these decisions happen. The vast majority of research focuses on the implementation phase, when code is first written, and the runtime phase, when the software is actually executing. However, a critical gap was found in the testing phase. Very few studies examine how the process of testing software, or the test code itself, contributes to energy waste. This is a significant oversight, as modern software development relies heavily on automated testing systems that run thousands of times a day, potentially consuming more energy than the final product itself. The researchers highlight that this area remains largely unexplored, suggesting a major opportunity for future improvement.

Perhaps the most urgent finding relates to what is being measured. The review found that 131 of the 137 studies measured energy consumption, often using specialized hardware counters to track electricity use down to the joule. In contrast, only three studies directly measured carbon emissions. This imbalance is problematic because global regulations are increasingly shifting from tracking energy to tracking carbon. The researchers point out that this gap is easily bridgeable. Since carbon emissions are calculated by multiplying energy use by the carbon intensity of the local power grid, the abundant data on energy could be converted to carbon data if researchers simply recorded the context of the power source. Currently, the field has the energy numbers but lacks the carbon context needed for modern environmental reporting.

To help developers apply these findings, the team created a practical decision framework. It acts as a guide for troubleshooting sustainability issues. If a software service is costing too much to run, the framework suggests looking first at the programming language and the algorithm before worrying about minor code tweaks. If a mobile app is draining a battery, it points toward specific coding patterns known to waste power. The guidelines emphasize that developers should measure energy directly rather than guessing based on how fast a program runs, as a faster program is not always a more efficient one. They also recommend setting explicit energy budgets for software features, treating energy waste with the same seriousness as a software bug.

The review concludes that the field of sustainable software engineering is maturing, with a growing international community and established methods. However, it calls for a shift in focus. Researchers are urged to study the testing phase more deeply, to replicate findings on high-impact decisions like language choice, and to start reporting carbon emissions alongside energy data. For industry professionals, the message is clear: the most effective way to reduce the environmental footprint of software is not through minor adjustments, but through fundamental choices made at the very beginning of the development process. By choosing efficient languages, algorithms, and data structures, and by measuring the results accurately, developers can significantly reduce the energy and carbon cost of the digital world.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →