It just happens to me about one code design question. Say, I have one \"template\" method that invokes some functions that may \"alter\". A intuitive design is to follow \"Templ
Think about what's required in each case:
Virtual call
Delegate call
There may be some optimisation so that there's no looping involved in the single-call case, but even so that will take a very quick check.
But basically there's just as much indirection involved with a delegate. Given the bit I'm unsure of in the virtual method call, it's possible that a call to an unoverridden virtual method in a massively deep type hierarchy would be slower... I'll give it a try and edit with the answer.
EDIT: I've tried playing around with both the depth of inheritance hierarchy (up to 20 levels), the point of "most derived overriding" and the declared variable type - and none of them seems to make a difference.
EDIT: I've just tried the original program using an interface (which is passed in) - that ends up having about the same performance as the delegate.