Tech Tip #38: Not everything is worth optimising

Some code isn't worth the energy it takes to optimise.

Video created by explainapaper.com

The problem

Optimisation itself costs engineering time and, with AI tools, energy. A small, rarely run tool may never pay back the effort.

The fix you can use today

  • Estimate the saving: runs per year, instances, energy per run.
  • Estimate the cost: engineering time and any AI inference.
  • Only proceed where the return is clear; say no to the rest.

GreenCode checks first whether a change will save more energy than it costs, and skips it if not.

Tools that help

  • Green Algorithms calculator: estimates the carbon footprint of a computation from its runtime, hardware and location
  • cloc: counts lines of code by language, a quick way to size a codebase

How GreenCode helps

GreenCode helps tackle this by setting its own AI footprint against the saving it makes. It measures reductions in absolute terms and shows owners where capacity can be retired, so a saving can be banked rather than spent. More on this.

Tags

#governance#cost#refactoring

Sources

All GreenCode Tech Tips

  • Tip #38
  • For CTOs and technical leads
  • Category Strategy, reporting and procurement
  • Format short video
GreenCode

Want this checked on your own system? Talk to the GreenCode team.

Get in touch