danielpalme / IocPerformance

Performance comparison of .NET IoC containers
https://danielpalme.github.io/IocPerformance
Apache License 2.0
876 stars 157 forks source link

Add MicroResolver library #79

Closed neuecc closed 7 years ago

neuecc commented 7 years ago

Hi Daniel, thank you to create great benchmark. I've created new library called MicroResolver - https://github.com/neuecc/MicroResolver Your benchmark was very useful for performance tuning and my library marked fastest in some tests -> result run on my machine(not include this pull request)

This pull request has two area of changes.

There is an arbitrary reason why I changed to Resolve<T>. MicroResolver is optimized for generic method. https://github.com/neuecc/MicroResolver#perforamnce-technique---generic-type-caching-per-resolver With this change, it is to be used.

If you do not want to do so, revert the changes made by Resolve<T> and only add MicroResolver.

ipjohnson commented 7 years ago

The change to use Resolve(Type) was made 4 years ago as the generic version is not as common or useful as the non generic implementation. If you look at the history of the files it can be found here

From my perspective changing all tests and all containers to uses a generic version just so one container that happens to have optimized for this one scenario can run faster seems way over the top but maybe that's just me.

dadhi commented 7 years ago

Agree with @ipjohnson, you obey to the benchmark and not vice versa :-)

danielpalme commented 7 years ago

I have added your container to the benchmark. But I agree with @dadhi and @ipjohnson and did not change the Resolve method.

neuecc commented 7 years ago

Thank you very much, I also agree with the reason. Of course, it is important to fight on the same ring. and, I'll change my ReadMe.