Patent ID: 7000227

Claim:
A method of compiling a source language routine, the method comprising: generating an intermediate language routine from the source language routine provided by a user; specifying an initial value of each routine variable by calling an initialization routine separated from the source language routine and provided by the user, the initialization routine being called from the intermediate language routine; performing an optimizing change to the intermediate language routine that results in an altered intermediate language routine, the optimizing change including a change based on a criterion specified by the user; generating a machine language routine from the altered intermediate language routine; executing the machine language routine in a computer system having architecture of a target computer system; measuring a characteristic of the execution by calling a measuring routine separated from the source language routine and provided by the user, the measuring routine being called from the intermediate language routine; and evaluating whether a stopping criterion after said executing is met based on a result of calling the measuring routine and if not, repeating said performing through said measuring, and saving the machine language routine having a best measured characteristic, until the stopping criterion is met, wherein said characteristic includes at least one of a lowest timing, a machine language routine size, and a bus utilization metric, wherein the initialization routine and the measuring routine are provided by the user as additional source code separated from the source language routine to be optimized, and wherein the initialization routine and the measuring routine are compiled, linked, and launched with the source language routine as a single application.