1) A method cache. Which we need anyway, so this isn't any surprise
2) Pre-figuring the delegated vtable functions.
#1 is a pretty straightforward thing, I'll detail my scheme in a bit.
#2 is where I think we can get some wins, though without a notification system it's a bit dodgy. (A fixable one, though)
What I'm considering for a vtable method-specific cache is pretty straightforward. When we build a class we allocate a new vtable for it, though the vtable's essentially just a clone of the delegate vtable. Make a call and we do a method lookup and then call it.
That's all fine and good, and the generic method cache will help here. However... we can do better. What I'm thinking of is caching the actual found method PMC pointer in the class somewhere (hanging off the vtable or in the class' attributes or something) such that we don't actually have to *do* any method lookups. With the method PMC directly cached, we just call the darned thing and are done with it. No lookups at all, something definitely faster than actually looking anything up.
At the moment I'm considering two storage schemes for the PMC pointers (one hanging off the vtable itself, another in the class attributes) but I'm open to suggestions here.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk