摘要 |
An embodiment of the present invention relates to a method and an apparatus for converting a program, which can enhance speed of executing a computer program. The present invention may provide the method for converting the program comprising the steps of: receiving the program; detecting one or more loop statements including one or more branch statements within the program; determining whether the loop statements may be divided into one or more sub-loop statements which perform the same function with the loop statements and from which the branch statements are eliminated; dividing the loop statements into the sub-loop statements and eliminating the branch statements from the loop statements in a case that the loop statements are determined to be divided in the determining result; and outputting a result where the branch statements are eliminated. |