logoalt Hacker News

calibas07/30/20254 repliesview on HN

Efficient code is also environmentally friendly.

First, efficient code is going to use less electricity, and thus, fewer resources will need to be consumed.

Second, efficient code means you don't need to be constantly upgrading your hardware.


Replies

breuleux07/30/2025

Well, that depends. Very inefficient code tends to only be used when absolutely needed. If an LLM becomes ten times faster at answering simple prompts, it may very well be used a hundred times more as a result, in which case electricity use will go up, not down. Efficiency gains commonly result in doing way more with more, not more with less.

show 2 replies
dist-epoch07/30/2025

Energy used for lighting didn't decrease when the world moved to LED lights which use much less energy - instead we just used more lighting everywhere, and now cities are white instead of yellow.

show 1 reply
yogishbaliga07/30/2025

Very true, but in recent years feature development has taken precedence over efficiency. VP of whatever says hardware is cheap, software engineers are not.

monkeyelite07/31/2025

Unless your code is running on a large number of machines across data centers that energy is about 2-3 figures a month in total utilization.

So if we use cost as a proxy for environment impact it’s not saving much at all.

I think this is a meme to help a different audience care about performance.