4 ms·
Is low energy significantly different from high performance code? I thought the general advice was make the code as fast as possible so the work can be finished
by MichaelGG 10y ago
Is low energy significantly different from high performance code? I thought the general advice was make the code as fast as possible so the work can be finished and the CPU slow/power down again.
Are there cases where an algorithm takes 10x the wall clock time to execute, but actually uses less energy on the same chip?
(Memory use/access is the main thing I guess that could be different.)
- bluedino 10y ago>> Is low energy significantly different from high performance code? It can be. Certain operations are more power efficient than others - subtraction and then a check for negative value instead of comparison, certain vector operations, loop unrolling, using less memory/bus traffic... >> Are there cases where an algorithm takes 10x the wall clock time to execute, but actually uses less energy on the same chip? Slower code can be more power efficent. You're just tuning for different results.
- MichaelGG 10y agoInteresting. Do you know of any open source examples offhand? I'd imagine this also requires very detailed knowledge of the chip, microcode, etc. Probably hard for x86 but I guess this kinda stuff would be on ARM where the programmer has deep vertical access (like as mentioned, Apple).