摘要 |
PURPOSE: A conditional branch command compiling method is provided to improve an average program execution speed by using a branch mis-prediction ratio and a branch mis-prediction penalty in the case that a source program is converted into a target program. CONSTITUTION: The method comprises steps of selecting a target compile block(S200), determining if the selected block has a flow control statement including a logical operation conditional statement(S210), calculating execution times(T1,T2) of target commands generated by a 1st compiler and a 2nd compiler(S220), comparing the execution times(T1,T2) of the target commands(S230), controlling the 2nd compiler to compile the source commands if the T1 is larger than the T2(S240), controlling the 1st compiler to compile the source commands if the T1 is larger than the T2 or if the selected block has not a flow control statement(S250), and then determining if compile source commands remain(S260).
|