BoDi
BoDi copied to clipboard
improve GetRegistrationResult
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.