An apparatus (100, 400, 510) for managing power based on data, the apparatus comprising: a processor configured to control a plurality of arithmetic units; a code segment searching unit (110, 410) configured to detect at least one code segment in which a power type has been inserted; the code segment being data of a variable, an array, a function, an argument, or a region; a block determining unit (120, 420) configured to determine at least one block of code based on a size of data of the at least one detected code segment in comparison with a predetermined threshold value; wherein the block determining unit (120, 420) is configured to verify whether the size of data of the at least one found code segment is greater than or equal to the predetermined threshold value, and to determine the at least one detected code segment to be the at least one determined block of code when the size of data of the at least one detected code segment is greater than or equal to the predetermined threshold value; a power mode control unit (130, 430) configured to control the at least one determined block of code to operate in a power mode corresponding to the power type, and the power type indicating one of at least three power consumption levels; a workload analyzing unit configured to analyze and verify a workload of the at least one determined block of code and further configured to control processing of the at least one determined block of code by changing the power mode based on the analyzed workload such that the apparatus (100, 400, 510) is configured to set the power mode during run-time rather than during compiling and to control power by calculating a weight value based on the verified workload for changing a system clock according to the calculated weight value. a processor configured to control a plurality of arithmetic units; a code segment searching unit (110, 410) configured to detect at least one code segment in which a power type has been inserted; the code segment being data of a variable, an array, a function, an argument, or a region; a block determining unit (120, 420) configured to determine at least one block of code based on a size of data of the at least one detected code segment in comparison with a predetermined threshold value; wherein the block determining unit (120, 420) is configured to verify whether the size of data of the at least one found code segment is greater than or equal to the predetermined threshold value, and to determine the at least one detected code segment to be the at least one determined block of code when the size of data of the at least one detected code segment is greater than or equal to the predetermined threshold value; a power mode control unit (130, 430) configured to control the at least one determined block of code to operate in a power mode corresponding to the power type, and the power type indicating one of at least three power consumption levels; a workload analyzing unit configured to analyze and verify a workload of the at least one determined block of code and further configured to control processing of the at least one determined block of code by changing the power mode based on the analyzed workload such that the apparatus (100, 400, 510) is configured to set the power mode during run-time rather than during compiling and to control power by calculating a weight value based on the verified workload for changing a system clock according to the calculated weight value.