The present invention provides a system and method for optimizing compilation
time of a program. In architecture, the system includes a compiler that generates
the least one block of code from the program; and a compilation optimizer. The
compilation optimizer generates a hash value for a block of code in the program
and stores the hash value with the block of code if the hash value is not equal
to a prior hash value for the block of code; and skips the optimization of the
block of code if the hash value equals the prior hash value. The present invention
can also be viewed as a method for optimizing compilation time of a program. The
method operates by generating a current hash value for a block of code in the program,
skipping the optimization of the block of code if the current hash value equals
a prior hash value, and storing the current hash value with the block of code if
the hash value is not equal to the prior hash value for the block of code.