A small inline caching demo. The meat is in interpreter.c.
Take a look at the blog post for more information.
Please feel free to submit pull requests with implementations in other languages, or with the extensions mentioned in the blog post. I'd love to see them!