1. A non-transitory computer readable storage media having instructions stored thereon that, when executed by a computer, implement a method for optimizing if statements in a program, the method comprising: obtaining for the program, a set of conditional expressions having an inclusion relation; computing a first provisional cost corresponding to the set of conditional expressions being positive, and a second provisional cost corresponding to the set of conditional expressions being negative; determining, for each conditional expression from the set of conditional expressions, a position in the program as a move destination for the conditional expression, using information of the set in which the conditional expression is included; and moving the conditional expression to the movie destination of the conditional expression, wherein moving the conditional expression comprises: in the case where a result of the conditional expression is not cached in a variable, generating an if statement for the conditional expression and caching a result of the conditional expression in a new variable, wherein the if statement is generated in increasing order of a total cost of the first provisional cost and the second provisional cost; and in the case where the result of the conditional expression is cached in the variable, replacing a conditional operator of the conditional expression with a logical operator, prior to caching the result in the new variable.
5. The storage media of claim 1 , wherein moving the conditional expression is performed in response to a result of comparison between an execution cost of the conditional expression before the movement and an execution cost of the conditional expression after the movement indicates an improvement in execution speed.