Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve GetRegistrationResult #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bollhals
Copy link

@bollhals bollhals commented May 6, 2021

PR 7 extracted out of #40

Focused on the GetRegistrationResult method

Main change:

  • Simplified GetRegistrationResult NamedInstance handling
  • Move Implicit registration into GetRegistrationResult to avoid returning nullable KeyValuePair.

Performance measurements:

ResolveFromType

Method Mean Error StdDev Min Max Median Rank Gen 0 Gen 1 Gen 2 Allocated
Current 225.6 ns 0.35 ns 0.33 ns 225.0 ns 226.1 ns 225.5 ns 1 0.0730 - - 344 B
Master 230.4 ns 0.90 ns 0.80 ns 229.2 ns 231.9 ns 230.3 ns 1 0.0730 - - 344 B

It's not simply possible to write a performance test for the NamedInstance / Implicit Regisration case, as it will changes the state of the container, thus only go through that case once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant