Comparing DI frameworks with Sitecore ReflectionUtil
As a follow up on my last post about IoC / DI containers and how to use the Sitecore API to perform inversion of control using ReflectionUtil, I’ve made a quick speed comparison of some common DI frameworks, Sitecores ReflectionUtil and the new keyword as the best case for how quick it is to instantiate an object. The results The table below shows how long time it took to resolve and instantiate 1000 instances of a type without using constructor or parameter injection and without any lifetime management. Ninject27.360421582498Unity2.73812495641971ReflectionUtil0.19632199878594Simple Injector0.0757655566157367new Keyword0.0386374153259534 I ran the test 10 times and the results that I show here are the median, ranking from worst in top to best in bottom. ...