Is there any performance difference between an instance method and an extension method?
Don't forget extension methods are just static method calls wrapped in syntactic sugar. So what you're really asking is
Is there a performance difference between static and instance methods
The answer is yes and there are various articles available on this subject
Some links
I would doubt there would be any performance difference because it is all syntactic sugar. The compiler just compiles it just as any other method call, except it is to a static method on a different class.
Some more details from my blog about the syntactic sugar: http://colinmackay.co.uk/2007/06/18/method-extensions/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With