An electronic device having a processor powered by a power source may be
operated by providing a plurality of program portions individually
executable by the processor for performing the same computing function.
Each program portion causes the processor to exhibit a different
instantaneous power consumption profile while performing the computing
function. A particular program portion is selected based on at least one
characteristic of the power source and executed on the processor to
perform the computing function.