Implement a virtual method cache

This should help reducing a bit the overhead of some function calls. It's actually difficult to say whether this helps or not because the profile data is fluctuating, but the profiles with the patch applied seem consistently better.
once you have one key you can actually shortcut this. maybe also encode static/non-static in the key?