Tuesday, March 1, 2011

.Net IoC performance comparison

Finally, I have compared performance of most widely-used IoC containers.
I'am clearly understand, that for IoC performance, in most cases, is not an issue, but I were still curious enough to test.
Here are the results:
Name Total PerRequest
Structure Map 377ms 0.377ms
Autofac 287ms 0.287ms
Unity 351ms 0.351ms
Ninject 2638ms 2.638ms
Manual 1ms 0.001ms

Test source is available via GitHub
Assumptions, behind the test, is optimized for Web scenario, where several threads request classes in different scopes.

No comments:

Post a Comment