Optimizing Software Applications for Power: Part 11 (of 13)

Part 11: Example 1 (Maximizing Idle Periods) - Avoid high-resolution periodic timers

High resolution timers (less than 10 or 15 ms) generate frequent, periodic interrupts that the OS must handle to determine whether a timeout has occurred. While high-resolution timers may seem to be a desirable system feature, in fact, such timers repeatedly wake the system from idle (Cx) states, robbing it of potential power savings. The inefficiency is particularly acute when the vast majority of periodic interrupts result in no timeout events, thus “wasting” processor resources needlessly. Aside from avoiding such timers as possible, developers should look for system APIs that allow user timer events to be grouped across processes to further reduce system interrupt frequency.

Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione