This is interesting - a side-by-side performance comparison of reflection, dynamic, and direct property access.

Reflection is slow – 2000 times slower than direct access – though we all knew that.

Dynamic is also slow, but only 60 times slower than direct access. That’s not too shabby.

Another way to look at it - dynamic is more than 30 times faster than reflection. This more than makes it viable for certain classes of problem.


blog comments powered by Disqus
Next Post
PhpMyAdmin and the White Screen of Death  12 Jul 2009
Prior Post
Older Programmers  07 Jul 2009
Related Posts
The Liskov substitution principle goes both ways  21 Mar 2020
Avoid hardcoded wait times  26 May 2018
Guaranteed Progression  19 May 2018
Prefer declarative method names  03 Feb 2018
Using Premeditation  27 Jan 2018
With Relocation  20 Jan 2018
Using Consolidation  13 Jan 2018
Using Semantic Types  06 Jan 2018
Using Extension Methods  30 Dec 2017
Error Methods  25 Nov 2017
More smart-code posts »
July 2009