摘要 |
In an object-oriented or object-based computer system, a compiler mechanism allows a compiler to automatically select among multiple implementations of an object to optimize the performance of the compiled code. The selection may be made by assigning a weighted cost to each of the implementations, and selecting the implementation with the lowest weighted cost, where the weighted cost represents estimates of execution frequencies for each of the object's functions. In the alternative, for implementations that have different interfaces, the selection may be made based on an evaluation of the functions used in the program compared to the functions provided by the different implementations, and selecting an implementation that contains all functions issued against the object with a minimum of functions that are not issued against the object.
|