Designer of the ARM chip discusses energy efficient desgin
queue.acm.org
queue.acm.org
I worked in the embedded space and we had rough notions of the (power) cost of using various instructions and hardware blocks -- more or less related to the number of bits flipped (for example adding 0 does less work that adding 0xfffffff).
It would be grand if this filtered down to the mainstream. If a program runs on a million machines, making it more power efficient would be a big win economically, but the programmer probably has no incentive.
Working out big O assumptions for power use on your platform is an interesting exercise!
That said, your core point is valid: not choosing the right sleep mode can hurt badly, avoiding polling is important, above all avoid busy loops. On many architectures avoiding FPU or vector instructions can put the units into a power save mode, etc...
But "use as many zeros as possible in arithmetic" can't possible be right.
I don't know where you got the idea about the flip-flops from.
Adders for example are implemented so that they grow exponentially in the number of bits in size, so that they use a time proportional to the log2 of the number of bits. Note that this means the number of bit transitions in a simple add can be much larger than the number of bits going in, meaning more power draw.
Of course we didn't worry about the instructions inputs in practice.
I think it was cheaper to store 1bits than 0bits ironically.
edit: explain more clearly that larger circuit size means more power drawn
I am guessing that it will all be architecturally specific. An ARM will have a different power profile to a MIPS running the same C code. Personally, I would like to see the option of a -Op switch to GCC that selects power-optimised code paths.