danielpalme / IocPerformance

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

Ensure root services are resolve prior to running benchmarks #72

Closed seesharper closed 7 years ago

seesharper commented 7 years ago

There is still a minor problem related to the fact that containers with less features has less root services, but I don't think we need to adjust for that at the moment as most of the top performing containers implements basically all features.

ipjohnson commented 7 years ago

Out of curiosity what did the before and after numbers look like?

seesharper commented 7 years ago

I did not compare the result before and after, but my guess is that AVL tree based lookup will actually suffer from this as the trees or subtrees gets deeper. I have noticed that we (LightInject, Grace and DryIoc) basically have the same tree implementation. Will be interesting to see the results though :) It is not a drastic increase of root services. 24 if I remember correctly.

ipjohnson commented 7 years ago

Cool, I agree it will probably have some effect because at some point dictionary<,> will be faster. Like everything it really depends on your use case.

dotnetjunkie commented 7 years ago

Those tree implementations are O(log n), but it takes to somewhere between a 1000 and 2000 registrations before the normal dictionary implementation starts to outperform this particular tree implementation.

seesharper commented 7 years ago

@ipjohnson btw, congrats on those numbers. Man, you are fast 👍

ipjohnson commented 7 years ago

Thanks at this point all the top containers are so fast it's hard to go

dotnetjunkie commented 7 years ago

I agree with @seesharper , @ipjohnson 's perf results are insane.