@riq: I took some time and made a test, and my hunch was correct...
If you create an implementation function from a base class and run it against a subclass it actually only calls the base class' method.
So, in the CocosNode example above, this won't work as expected if a subclass of CocosNode happens to override visit...
+(void) initialize {
visitSEL = @selector(visit);
visitCALL = (visitIMP)[CocosNode instanceMethodForSelector:visitSEL];
}
Because now every type of CocosNode would be called by the same visitCALL() which is actually the root CocosNode's implementation of visit.
To get around this, each class needs to keep a unique visitCALL.
Well, ok, maybe just add the + (void) initialize{} to every subclass too and store the visitCall as a Class property (not an instance property).
But, since you would still have to access the class from inside CocosNode's visit to get the visitCALL specific to each subclass of CocosNode, would this added request on each iteration outweigh the performance benefit of this whole idea?
This kind of thing is probably a bit safer in places like the scheduler, timer, and touch dispatcher etc...