Patent ID: 7543285

Claim:
A computer-implemented method comprising: identifying during compilation a code portion in source code of an application, wherein the code portion requires a dynamic data value, wherein a dynamic data value is a data value that changes based on execution behavior of the application; generating a compiled version of the code portion optimized for a general value of the dynamic data value; generating a series of instructions to be executed when the application is executed, wherein the series of instructions is configured to monitor a plurality of executions of the compiled version of the code portion to determine a first frequently occurring value of the dynamic data value, to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value, wherein subsequent execution flow is directed to the first optimized code portion when the first frequently occurring value is used; to monitor the ongoing execution of the compiled version of the code portion to determine one or more additional frequently occurring values of the dynamic data value, and to generate new optimized code portions using the additional frequently occurring values, wherein subsequent execution flow is directed to the new optimized code portions when the corresponding new frequently occurring value is used and wherein one of the new optimized code portions replaces the first optimized code code portion; and inserting the series of instructions in a compiled version of the source code.