IoC Battle–Revisited


I have been evangelizing the use of IoC for a number of years. Frequently the newly converted ask the following two questions:

  1. Which container to use?
  2. Which is fastest?

My answer to the first is almost always the one you choose, and for the second question I refer them to Martin From’s IoCBattleweb page. I wont get into the reason for my answer to the first question in this post (I will save that for another day). However, I have found that Martin’s web site was missing the TinyIOC container, the Caliburn.Micro.SimpleContainer, and the existing containers needed a version refresh.

Thankfully, Martin checked his code into github, so out came ye’ ole fork. I have updated the code accordingly, and it is available at IoCBattleon my githubpage.

Enough talk – here are the results.


Test Platform

These tests were performed on an Intel i7-2630QM 2.00 Ghz with 16 gb of memory running Windows 7 64-bit.

IoC Containers Tested

Cautionary Note

It is important to realize that performance is not the primary criteria to use in selecting an IOC container. It is important in some cases, but overall it is just one of a number of issues that I consider a secondary concerns.

Each of these containers has strengths and weaknesses. They offer different features, and sometimes do so in different ways. Finally, they operate in different runtimes and environments.

Bottom line – spend the time to find the container that does what you need and you are comfortable with.

Source Code

You can download my modified version of the source code from original IoCBattle at github.


My thanks go to Martin From for doing this test and the Dynamo IoC Container.


comments powered by Disqus