Environmentally responsible coding
How many of you have considered the environmental impact of the code you write, or code you use on a daily basis?
Pulling a number from somewhere, a typical PC might draw 200 watts when doing something intensive. At the wall, the inefficiency of the PSU will cause the actual power to be somewhat higher, let's say 300 watts.
Let's consider some heavily used code. For instance, the JPEG decoder present in all web browsers.
Suppose there are half a billion active Internet users. Let's also suppose that each user uses the web, and views an average of 5000 JPEGs per day (a typical page might have a hundred or more images on it, so this is probably an underestimate). So, the JPEG decoder executes about 2.5 trillion times per day.
Suppose it takes on average, 0.02 seconds to decode a JPEG. Remember, some JPEGs are large, some are small.
Starting from these assumptions, what is the energy impact of a 10% improvement in efficiency of the JPEG decoder?
2.5e12 * 300 watts * 0.002 seconds = 1500 gigajoules.
That's the equivalent of burning about 12000 gallons of gasoline every day. In a year, that's 4.4 million gallons.
Imagine having the ability to spend a few hours optimizing something, and the end result is that 4.4 million fewer gallons of gas are burned each year?
Something to think about.