Skip to content

Commit

Permalink
Switch back to use ConstructorInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLarsson committed Apr 12, 2017
1 parent 025cce5 commit 60fd7c0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
10 changes: 5 additions & 5 deletions Gu.Inject.Benchmarks/Benchmarks/GetFoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC


```
| Method | Mean | StdErr | StdDev | Median | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |------------ |-------------- |------- |-------------- |------- |---------- |
| Ninject | 4,934.2377 ns | 47.8980 ns | 214.2064 ns | 4,870.3756 ns | 32.14 | 1.83 | 0.4934 | 1.39 kB |
| SimpleInjector | 61.6829 ns | 0.6583 ns | 4.1637 ns | 59.9336 ns | 0.40 | 0.03 | 0.0024 | 12 B |
| GuInject | 153.7411 ns | 1.5119 ns | 6.2336 ns | 151.1570 ns | 1.00 | 0.00 | 0.0341 | 84 B |
| Method | Mean | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |------- |-------------- |------- |---------- |
| Ninject | 4,963.2895 ns | 70.2442 ns | 32.44 | 0.61 | 0.4608 | 1.39 kB |
| SimpleInjector | 62.5121 ns | 1.5561 ns | 0.41 | 0.01 | 0.0034 | 12 B |
| GuInject | 153.0247 ns | 2.0584 ns | 1.00 | 0.00 | 0.0334 | 84 B |
10 changes: 5 additions & 5 deletions Gu.Inject.Benchmarks/Benchmarks/GetGraph50.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC


```
| Method | Mean | StdErr | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |----------- |------- |-------------- |------- |---------- |
| Ninject | 5,169.3762 ns | 12.5128 ns | 48.4618 ns | 34.41 | 0.91 | 0.4934 | 1.39 kB |
| SimpleInjector | 813.7279 ns | 9.0025 ns | 33.6841 ns | 5.42 | 0.25 | 0.2652 | 584 B |
| GuInject | 150.3227 ns | 1.0648 ns | 3.9842 ns | 1.00 | 0.00 | 0.0341 | 84 B |
| Method | Mean | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |------------ |------- |-------------- |------- |---------- |
| Ninject | 5,486.7607 ns | 160.4916 ns | 35.02 | 1.29 | 0.4852 | 1.39 kB |
| SimpleInjector | 821.8564 ns | 16.3422 ns | 5.25 | 0.16 | 0.2327 | 584 B |
| GuInject | 156.7617 ns | 3.8268 ns | 1.00 | 0.00 | 0.0350 | 84 B |
10 changes: 5 additions & 5 deletions Gu.Inject.Benchmarks/Benchmarks/GetGraph500.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC


```
| Method | Mean | StdErr | StdDev | Median | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |------------ |-------------- |------- |-------------- |------- |---------- |
| Ninject | 5,219.5863 ns | 55.3864 ns | 501.5449 ns | 5,032.1835 ns | 34.80 | 3.34 | 0.4893 | 1.39 kB |
| SimpleInjector | 7,546.0423 ns | 22.3550 ns | 83.6448 ns | 7,536.4411 ns | 50.31 | 0.71 | 2.1830 | 5.37 kB |
| GuInject | 149.9894 ns | 0.3831 ns | 1.4335 ns | 149.8120 ns | 1.00 | 0.00 | 0.0341 | 84 B |
| Method | Mean | StdErr | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |------------ |------- |-------------- |------- |---------- |
| Ninject | 4,975.4149 ns | 22.9172 ns | 88.7579 ns | 28.92 | 2.14 | 0.4771 | 1.39 kB |
| SimpleInjector | 7,703.3332 ns | 38.2434 ns | 148.1161 ns | 44.78 | 3.33 | 2.2074 | 5.37 kB |
| GuInject | 172.8908 ns | 1.7725 ns | 12.2800 ns | 1.00 | 0.00 | 0.0342 | 84 B |
10 changes: 5 additions & 5 deletions Gu.Inject.Benchmarks/Benchmarks/NewAndGetFoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC


```
| Method | Mean | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |------------ |---------- |------- |-------------- |------- |---------- |
| Ninject | 367.7778 us | 2.6490 us | 170.76 | 1.99 | 1.6276 | 24.06 kB |
| SimpleInjector | 213.3155 us | 0.9385 us | 99.04 | 1.02 | 6.9010 | 36.99 kB |
| GuInject | 2.1539 us | 0.0209 us | 1.00 | 0.00 | 0.1851 | 607 B |
| Method | Mean | StdErr | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |------------ |---------- |----------- |------- |-------------- |-------- |---------- |
| Ninject | 398.2949 us | 4.3704 us | 20.9598 us | 244.53 | 13.03 | 1.8880 | 24.06 kB |
| SimpleInjector | 228.6692 us | 2.6014 us | 9.7337 us | 140.39 | 6.08 | 12.5558 | 36.99 kB |
| GuInject | 1.6291 us | 0.0060 us | 0.0232 us | 1.00 | 0.00 | 0.1165 | 451 B |
6 changes: 3 additions & 3 deletions Gu.Inject.Benchmarks/Benchmarks/NewAndGetGraph50.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC
```
| Method | Mean | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |-------------- |----------- |------- |-------------- |------- |---------- |
| Ninject | 4,410.5559 us | 63.2444 us | 42.62 | 0.69 | - | 183.68 kB |
| SimpleInjector | 1,186.1895 us | 9.9300 us | 11.46 | 0.13 | - | 77.27 kB |
| GuInject | 103.4845 us | 0.9006 us | 1.00 | 0.00 | 8.7162 | 20.75 kB |
| Ninject | 4,425.7875 us | 59.0675 us | 48.78 | 0.80 | - | 183.68 kB |
| SimpleInjector | 1,214.0124 us | 15.9778 us | 13.38 | 0.22 | 1.8229 | 77.37 kB |
| GuInject | 90.7330 us | 0.9540 us | 1.00 | 0.00 | 5.8268 | 17.8 kB |
10 changes: 5 additions & 5 deletions Gu.Inject.Benchmarks/Benchmarks/NewAndGetGraph500.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Frequency=2435878 Hz, Resolution=410.5296 ns, Timer=TSC


```
| Method | Mean | StdErr | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |--------------- |------------ |------------ |------- |-------------- |-------- |---------- |
| Ninject | 37,302.1641 us | 122.9805 us | 426.0171 us | 57.82 | 1.10 | - | 1.56 MB |
| SimpleInjector | 9,901.7958 us | 150.2645 us | 619.5563 us | 15.35 | 0.96 | - | 459.46 kB |
| GuInject | 645.3421 us | 2.7223 us | 10.5436 us | 1.00 | 0.00 | 41.0739 | 94.69 kB |
| Method | Mean | StdErr | StdDev | Scaled | Scaled-StdDev | Gen 0 | Allocated |
|--------------- |--------------- |------------ |-------------- |------- |-------------- |-------- |---------- |
| Ninject | 38,897.6587 us | 537.2203 us | 2,080.6453 us | 128.38 | 6.95 | - | 1.56 MB |
| SimpleInjector | 10,069.2720 us | 30.2513 us | 113.1900 us | 33.23 | 0.64 | - | 449.69 kB |
| GuInject | 303.0636 us | 1.3110 us | 5.0775 us | 1.00 | 0.00 | 20.1823 | 62 kB |
8 changes: 4 additions & 4 deletions Gu.Inject/Internals/Ctor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ private static IFactory Create(Type type)
.Select(x => x.ParameterType)
.ToArray();

if (ctor.IsPublic)
{
return new CreateInstanceFactory(type, parameters);
}
//if (ctor.IsPublic)
//{
// return new CreateInstanceFactory(type, parameters);
//}

return new Factory(ctor, parameters);
}
Expand Down

0 comments on commit 60fd7c0

Please sign in to comment.