Closed neuecc closed 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.
Agree with @ipjohnson, you obey to the benchmark and not vice versa :-)
I have added your container to the benchmark. But I agree with @dadhi and @ipjohnson and did not change the Resolve method.
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.
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.
object IContainerAdapter.Resolve(Type)
->T IContainerAdapter.Resolve<T>()
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 addMicroResolver
.