GreenCode benchmarks a system under load, rewrites the code responsible for the waste and measures the difference, so the saving arrives as a number rather than an estimate, and takes several cost lines down with it.
Energy and cost reduction is the measured outcome of GreenCode's benchmarking and optimisation stage. The pipeline does not stop at reporting that a system is inefficient. It changes the code responsible, runs the same workload again and reports the difference, with the cost consequences attached.
It is the fourth of five stages, and it depends on the three before it. The codebase is first mapped into a searchable index with a software bill of materials and a list of interfaces and endpoints. Quality is then baselined against recognised quality, security and green software patterns and refactored, which is a low-energy precursor that often yields savings on its own. The system's infrastructure is then reconstituted as code so the software can be deployed into a representative environment.
Stage four takes those three inputs. It exercises the deployed system under load while an observability stack records performance, time and energy against individual code constructs. The least efficient elements are ranked, models fine-tuned on energy metrics rewrite them, and the loop repeats until the target saving is met or the iteration budget runs out.
View full sizeTwo numbers a finance director and an engineering lead can both use: the energy the system drew before, and the energy it draws now, on the same infrastructure under the same load. Alongside them come the optimised code as pull requests on a branch, so a person approves every change, and a report of what was altered and why.
The energy bill is only the first line. Demand that falls stays fallen at every instance of the software, every day it runs. Less compute means less hardware and less hosting. Code that arrives documented and tested is cheaper to maintain and raises fewer incidents. Lighter software extends the working life of the devices it runs on. That is the lower total cost of ownership case, and it matters because refactoring purely for efficiency is rarely approved on its own.
The economics of doing this by hand are the reason it is automated. CAST's research and other industry estimates put manual refactoring at 3 to 8 dollars per line of code, on an estate where 60 to 80% of software in service is legacy. The climate case puts the carbon cost of the AI inference that does the work at well under a thousandth of the first year's saving.
The target is a net reduction of more than 15% per system, measured from the original codebase on its generated infrastructure to the optimised one. That figure is set deliberately below the 10 to 30% range the literature reports for ordinary refactoring. Energy assessment follows the Green Software Foundation's Impact Framework where it fits, and the fifth stage rates the system before and after against a software carbon efficiency rating.
A saving only counts if nothing else got worse. Quality assessment issues, security flaws and error rate must not rise in aggregate, and maintainability must hold above the project's threshold. Regression checks run between iterations rather than at the end.
The state of the art reviews set the constraints. Energy measurement is reasonably mature on standalone systems and lab testbeds, but fragmented and harder to attribute in cloud and multi-tenant settings, where hardware counters are often unavailable. Attributing energy to a specific component under concurrency is uncertain, so an apparent optimisation can simply move consumption elsewhere. GreenCode's response is explicit measurement boundaries, stated confidence and evidence generated inside the workflow rather than beside it.
Read the outcome for the software owner on reduced energy use, and the sector-level arithmetic in the climate case.