Devices, compilers and methods to reduce energy consumption associated
with execution of a program by adjusting a computational capability of a
CPU with higher accuracy than before. A device sets an appropriate
computational capability to the CPU. It includes: changing a
computational capability of the CPU every time each of a plurality of
program areas included in the execution program is executed while the
execution program is being executed, and measuring execution time each of
the program areas; deciding an optimal computational capability required
to execute the program area using the CPU, based on the execution time
for each of the computational capabilities measured for the respective
program areas; and performing setting of the optimal computational
capability for executing the program area, which is to be used when
executing the program area again in the course of executing the execution
program, for each of the program areas.