Sorry if you consider this as not an answer: first, it depends on how you use them. Please see my comment to the question. Secondly, this question can present only the sport interest, something like cockroach or frog races. In practice, there won't be any difference at all, or, if there is some, it should be so insignificant so it should not be taken into account in any decision. At the same time, the difference in flexibility, code quality, architectural and expressive capabilities between abstract class based and interface based polymorphism is so formidable that is makes performance considerations related to this choice just ridiculous. At the same time, static call dispatching without virtual methods and interfaces is always a bit better, by apparent reasons; and this is often taken into consideration.
Performance is only important when the throughput and responsiveness of the whole application are concerned, but it is achieved using very different approaches. Unfortunately, this is not the time to discuss it, because it would need a whole big book to cover at least essential part of this topic.
So, by the reasons I explained above, this question is not interesting enough to make me doing some measurements; please don't blame me for that. However, you can easily perform the measurements to compare the operations you are interested in. To get sufficient accuracy, you will need to use the class
System.Diagnostics.Stopwatch
:
http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx[
^].
To make sure you get fine time resolution and to learn the resolution, you can use its static properties
IsHighResolution
and
Frequency
.
Have fun, but my prediction is: you won't find anything interesting or practically significant.
About other aspects of interfaces vs. abstract base classes, please my past answers and other answers in these discussions:
When we use abstract and when we use interface...?[
^],
Difference between abstract class and interface if they have same no of methods and var[
^],
How to decide to choose Abstract class or an Interface[
^],
Interfaces and Polymorphism[
^].
Nobody discussed performance though, perhaps because all participants understood it wasn't a point.
—SA