A fast program is not necessarily an energy-efficient one. The practical goal is to deliver acceptable responsiveness with as little hardware and electricity as possible. Clean code, performance, and sustainability are related concerns, but improving one does not automatically improve the others. section 8.3
Usage changes the lifecycle balance
Roughly 75% of a smartphone’s lifetime carbon emissions arise before it is turned on. For servers, the pre-use share is lower—about 30%–40%—because electricity consumption dominates over years of operation. Reducing electricity use matters, but so does keeping functional devices in service rather than forcing replacement through unsupported or increasingly demanding software. section 8.2.2
To investigate waste, distinguish static analysis from runtime observation. Static analysis can flag resource-wasting patterns without running code; dynamic analysis can observe behavior, including energy consumption. Microbenchmarks and CPU or memory profilers provide another route to finding inefficient work, though their resource measurements should not be mistaken for direct energy measurements. section 8.5.2
A storage decision
For a PostgreSQL customer table, inspect field types, sizes, and redundant information, then consider what data still needs to be retained. Keeping less unnecessary data and accumulated waste can reduce hardware needs and energy consumption. Delete data when it is no longer needed, unless legal requirements call for retention. section 8.4.3




