Can I still get an Energy Efficient Free Lunch?

When the semiconductor industry was turning to multicore chips and lowering clock rates, Herb Sutter wrote a seminal article entitled "The Free Lunch is Over: A Fundamental Turn Toward Concurrency in Software." Up to that point software developers relied on the increasing clock speeds (the "free lunch") to give their software a boost in the next generation of processors. Mr. Sutter was serving notice that this practice was over and programmers would now need to turn to parallel programming to get improved performance.

I got to thinking about this the other day and contemplated on whether or not this applied to more than just execution speed performance. Specifially, I was wondering if we're still in the free lunch phase with regards to energy efficient performance or if developers can still coast on their laurels since new hardware continues to become still better at using less and less energy.

I arrived as this existential conundrum as I was looking over an internal presentation for an upcoming processor release from Intel. One prominent feature that was touted was the increase in energy efficiency to be realized by the new chip. Better technology has reduced the energy leakage within processor circuits. I imagine that there is more research and development (or already has been such R&D) that can be and will be done in the near future to get even better energy performance from processors. If that is the case, why should software developers be concerned with programming applications that actively conserve power?

(If you're a laurel coaster, stop here, don't read the rest of this post, and go check out your favorite online comic strip.)

For those of you that are still reading, let me first say, you can be sure that your competitors are taking steps to write software that uses the processing cores more efficiently. In terms of performance, the fastest software will be the one that sells more copies. Energy efficiency has become another dimension for comparing competing software products. In some cases, it might even be the more important dimension for a consumer's choice.

Mobile devices have become nearly ubiquitous (or so they tell me). After some amount of use these devices need to be recharged. If your application runs down the stored battery power faster than an alternative product, users will gravitate to that competing software. Device owners have already spent a pretty penny on their current hardware.  It is highly unlikely they are willing to wait months to upgrade to a model with a better energy conserving processor in order for your software to not drain the battery as quickly. If this is your strategy for energy efficient performance, you've already lost the sale. Even if users would be willing to wait, they'll be using something else and getting familiar with that software. Besides, the better energy efficiency of a new processor will also benefit your competition's software.

Secondly, it's really not all that hard to program for energy efficient performance. Many of the things you would already do for execution optimization and performance (use better algorithms, multiple threads, compiler optimizations, etc.) will directly benefit the power consumption rate of your software. For more techniques and ideas on how to upgrade your applications to be more energy efficient, visit the Intel Power Efficiency Community.

Sitting around and waiting for the next helping of improved energy efficient hardware "free lunch" to make your software better is easy. (Heck, you might even be able to surreptitiously take time off from work to practice your drumming at the beach.) But if you're interested in making your software the best that it can be and the most desired products to consumers, be proactive and start looking at how to improve your application's power considerations today. There will be time for beach drumming after you make that first million dollar$.

如需更全面地了解编译器优化,请参阅优化注意事项