Patent ID: 8776035

Claim:
A method of selecting optimized code to be executed in a computing system comprising a first processor and a second processor, comprising: compiling a user-defined function included within a client job received by the computing system to create a first compiled code portion and a second compiled code portion, wherein the first compiled code portion is optimized based on an architecture implementation of the first processor and the second compiled code is optimized based on an architecture implementation of the second processor, wherein the respective architecture implementations of the first and second processors are different, and wherein compiling the function comprises: storing the first and second compiled code portions as first and second libraries; generating an executable comprising a first reference to the first library, a second reference to the second library, and selection code comprising instructions for selecting between the first and second references based on a processor ID; at execution, using the selection code to determine which of the first and second references to use based on the processor ID of a processor to which the executable is assigned; upon determining that the executable is assigned to the first processor, loading the first library into memory to be executed by the first processor and not the second library; and upon determining that the executable is assigned to the second processor, loading the second library into memory to be executed by the second processor and not the first library.