1. A computer-implemented method, comprising: compiling a first method call at a first call site in code of an object-oriented language, wherein the first call site is associated with a first method selector; referencing a plurality of per-selector caches, each per-selector cache being associated with a respective method selector and available to multiple call sites that use the respective method selector, wherein each per-selector cache is configured to be searched based on a corresponding class identification when called from a respective call site; identifying a first per-selector cache, from among the plurality of per-selector caches, using the first method selector; and invoking a method on a first object by performing a lookup in the first per-selector cache using a class associated with the first object to determine if a first target function exists in the first per-selector cache.
1. A computer-implemented method, comprising: compiling a first method call at a first call site in code of an object-oriented language, wherein the first call site is associated with a first method selector; referencing a plurality of per-selector caches, each per-selector cache being associated with a respective method selector and available to multiple call sites that use the respective method selector, wherein each per-selector cache is configured to be searched based on a corresponding class identification when called from a respective call site; identifying a first per-selector cache, from among the plurality of per-selector caches, using the first method selector; and invoking a method on a first object by performing a lookup in the first per-selector cache using a class associated with the first object to determine if a first target function exists in the first per-selector cache. 6. The computer-implemented method of claim 1 , further comprising: invoking the method on a second object at the first call site, wherein the first call site is associated with the first per-selector cache; and performing a lookup in the first per-selector cache using a second class associated with the second object to determine if a second target function exists in the first per-selector cache.