| CPC G06F 8/4432 (2013.01) | 20 Claims |

|
1. A computing system comprising:
at least one hardware processor;
at least one memory coupled to the at least one hardware processor; and
one or more computer-readable storage media storing computer-executable instructions that, when executed, cause the computing system to perform operations comprising:
receiving a set of instructions expressed in a programming language;
performing code evaluation and replacement operations comprising:
receiving a request to analyze the set of instructions to determine whether one or more instructions of the set of instructions are replaceable with a more energy efficient instruction for performing a function accomplished by a respective instruction of the one or more instructions;
for each respective instruction of the one or more instructions, determining a corresponding rule defined for the respective instruction;
for each respective instruction of the one or more instructions, measuring or estimating an amount of energy saved by comparing an amount of energy used or estimated to be used in executing the one or more instructions including the respective instruction with an amount of energy used or estimated to be used in executing the one or more instructions modified to use a replacement operation specified in the corresponding rule in place of the respective instruction;
for each respective instruction of the one or more instructions, determining whether the corresponding rule is triggered, wherein the corresponding rule is triggered based on the measured or estimated amount of energy saved by replacing the respective instruction with the replacement operation specified in the corresponding rule;
for respective instructions of the one or more instructions for which the corresponding rule was triggered: (1) in the set of instructions, replacing the respective instruction with the replacement operation specified in the corresponding rule; and
subsequent to the performing code evaluation and replacement operations, compiling or interpreting the set of instructions with the replacement operation.
|