Patent ID: 8495605

Claim:
A method executed by a processor for policy-based program optimization of existing software code that is segmented into code modules, said optimization being based on a performance policy, said performance policy defining a target characteristic and a sacrificial characteristic relating to said existing software code; said performance policy further defining an allowable degradation of said sacrificial characteristic resulting from optimization of said target characteristic, said method comprising: identifying code modules that contribute to suboptimal performance of said software code with respect to said target characteristic; identifying code transformations that increase performance of said suboptimal code modules with respect to said target characteristic; calculating total performance degradation resulting from the identified code transformations and quantifying a corresponding improvement in said target characteristic; applying said performance policy to determine which identified code transformations should be applied based on a comparison of said calculated total performance degradation and corresponding improvement in said target characteristic; and optimizing said identified code modules by selectively applying said code transformations in accordance with said performance policy to increase performance of said software code with respect to said target characteristic.