Inline caching is a popular technique for optimizing dynamic language runtimes. The idea comes from the 1984 paper Efficient implementation of the Smalltalk-80 system (PDF) by L. Peter Deutsch and Allan M. Schiffman. I have written about it before (Inline caching and Inline caching: quickening), using a tiny sample interpreter.