diff --git a/README.md b/README.md index c9540357e..33d8b2e4f 100644 --- a/README.md +++ b/README.md @@ -937,192 +937,103 @@ Installed [.NET SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) - - - - - - - - + + + + + + + +
Method Mean ErrorStdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Pure.DI Resolve<T>()'174.7 ns2.99 ns2.65 ns1.000.030.0336-632 B1.00
'Hand Coded'174.9 ns3.11 ns2.60 ns1.000.000.0336-632 B1.00
'Pure.DI composition root'176.0 ns3.55 ns4.35 ns1.010.030.0336-632 B1.00
'Pure.DI Resolve(Type)'177.2 ns2.47 ns2.06 ns1.010.010.0336-632 B1.00
DryIoc200.4 ns4.13 ns7.02 ns1.110.040.0334-632 B1.00
LightInject221.0 ns4.44 ns4.15 ns1.270.030.0336-632 B1.00
Unity10,213.1 ns173.93 ns154.19 ns58.490.700.7629-14520 B22.97
Autofac27,742.9 ns134.03 ns118.82 ns158.632.391.52590.061028816 B45.59
'Hand Coded'181.4 ns3.65 ns6.09 ns1.000.000.0365-632 B1.00
'Pure.DI composition root'182.0 ns3.57 ns7.29 ns1.010.040.0365-632 B1.00
'Pure.DI Resolve<T>()'186.1 ns3.52 ns4.58 ns1.030.040.0365-632 B1.00
'Pure.DI Resolve(Type)'189.8 ns3.90 ns11.05 ns1.080.070.0365-632 B1.00
LightInject198.9 ns4.06 ns8.01 ns1.100.050.0365-632 B1.00
DryIoc213.3 ns4.35 ns10.82 ns1.200.070.0365-632 B1.00
Unity10,172.3 ns193.16 ns180.68 ns55.871.970.8392-14520 B22.97
Autofac27,444.9 ns318.63 ns248.76 ns149.083.871.64790.061028816 B45.59
[Array details](readme/ArrayDetails.md) -
-Transient - - - - - - - - - - - - - - - - -
Method Mean Error StdDev RatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Pure.DI composition root'11.71 ns0.360 ns0.719 ns1.010.100.0009-24 B1.00
'Hand Coded'11.74 ns0.364 ns0.880 ns1.000.000.0009-24 B1.00
'Pure.DI Resolve<T>()'15.11 ns0.428 ns0.864 ns1.300.120.0009-24 B1.00
'Pure.DI Resolve(Type)'19.97 ns0.527 ns1.322 ns1.710.160.0009-24 B1.00
LightInject25.10 ns0.628 ns1.677 ns2.140.210.0009-24 B1.00
'Microsoft DI'34.89 ns0.821 ns2.192 ns2.970.280.0009-24 B1.00
DryIoc37.01 ns0.874 ns1.785 ns3.180.310.0009-24 B1.00
'Simple Injector'47.68 ns1.072 ns2.670 ns4.080.410.0009-24 B1.00
Unity15,191.23 ns300.391 ns485.075 ns1,343.3898.430.1831-5176 B215.67
Autofac45,388.57 ns901.253 ns2,467.165 ns3,879.60376.821.22070.061033224 B1,384.33
'Castle Windsor'92,274.63 ns2,395.998 ns6,353.846 ns7,919.73844.072.0752-54360 B2,265.00
Ninject437,510.11 ns11,211.063 ns31,251.962 ns37,506.083,954.024.88281.4648131008 B5,458.67
- -[Transient details](readme/TransientDetails.md) - -
-
Enum - - - - - - - - - + + + + + + + + +
Method Mean ErrorStdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Pure.DI Resolve(Type)'133.1 ns1.92 ns1.60 ns0.830.010.0184-344 B1.00
'Pure.DI Resolve<T>()'136.7 ns2.76 ns4.04 ns0.870.020.0184-344 B1.00
'Pure.DI composition root'147.2 ns1.87 ns1.56 ns0.920.020.0184-344 B1.00
'Hand Coded'160.4 ns3.02 ns2.68 ns1.000.000.0184-344 B1.00
'Microsoft DI'191.0 ns2.29 ns1.91 ns1.190.020.0250-472 B1.37
LightInject287.5 ns5.61 ns5.24 ns1.790.040.0458-856 B2.49
DryIoc290.3 ns5.81 ns6.22 ns1.800.050.0458-856 B2.49
Unity7,807.3 ns153.87 ns164.64 ns48.981.430.7324-13752 B39.98
Autofac28,057.8 ns201.48 ns168.25 ns175.322.371.52590.061028944 B84.14
'Pure.DI Resolve<T>()'136.3 ns2.77 ns4.48 ns0.880.030.0198-344 B1.00
'Pure.DI Resolve(Type)'137.9 ns2.84 ns4.66 ns0.880.030.0198-344 B1.00
'Pure.DI composition root'141.5 ns2.69 ns5.50 ns0.920.050.0198-344 B1.00
'Hand Coded'157.7 ns3.24 ns3.32 ns1.000.000.0198-344 B1.00
'Microsoft DI'189.1 ns3.11 ns2.60 ns1.200.020.0272-472 B1.37
LightInject290.2 ns5.79 ns5.42 ns1.840.050.0496-856 B2.49
DryIoc308.8 ns6.25 ns14.12 ns1.920.080.0496-856 B2.49
Unity7,874.1 ns137.31 ns128.44 ns50.051.180.7935-13752 B39.98
Autofac26,601.4 ns213.84 ns189.56 ns168.634.201.64790.061028944 B84.14
[Enum details](readme/EnumDetails.md)
-
-Singleton - - - - - - - - - - - - - - - - -
Method Mean Error StdDev Median RatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Hand Coded'11.30 ns0.347 ns0.950 ns11.28 ns1.000.000.0009-24 B1.00
'Pure.DI composition root'11.83 ns0.366 ns0.989 ns11.94 ns1.060.140.0009-24 B1.00
'Pure.DI Resolve<T>()'15.58 ns0.438 ns0.999 ns15.66 ns1.410.140.0009-24 B1.00
'Pure.DI Resolve(Type)'19.48 ns0.526 ns0.907 ns19.46 ns1.750.190.0009-24 B1.00
DryIoc36.15 ns0.841 ns1.966 ns36.16 ns3.250.360.0009-24 B1.00
'Simple Injector'50.35 ns1.132 ns2.438 ns50.47 ns4.560.460.0009-24 B1.00
'Microsoft DI'54.55 ns1.219 ns3.168 ns54.37 ns4.880.540.0008-24 B1.00
LightInject1,167.20 ns29.455 ns85.455 ns1,168.13 ns104.3912.14--24 B1.00
Unity13,851.41 ns990.752 ns2,921.254 ns13,388.93 ns1,221.03270.170.1068-3184 B132.67
Autofac29,432.69 ns580.743 ns1,250.110 ns29,628.93 ns2,662.95238.010.91550.030524208 B1,008.67
'Castle Windsor'55,866.46 ns4,142.818 ns12,215.193 ns50,217.47 ns4,961.921,115.860.8545-23912 B996.33
Ninject185,155.88 ns5,901.921 ns16,156.414 ns183,742.97 ns16,506.271,997.271.9531-74097 B3,087.38
- -[Singleton details](readme/SingletonDetails.md) - -
-
Func - - - - - - - - + + + + + + + +
Method Mean ErrorStdDevRatioRatioSDGen0AllocatedAlloc Ratio
'Pure.DI composition root'9.795 ns0.1705 ns0.1424 ns0.980.020.001324 B1.00
'Hand Coded'9.988 ns0.1626 ns0.1441 ns1.000.000.001324 B1.00
'Pure.DI Resolve<T>()'12.079 ns0.1415 ns0.1255 ns1.210.020.001324 B1.00
'Pure.DI Resolve(Type)'12.984 ns0.1515 ns0.1417 ns1.300.020.001324 B1.00
DryIoc69.285 ns1.4315 ns1.4059 ns6.930.180.0063120 B5.00
LightInject325.360 ns5.2084 ns4.6171 ns32.580.570.0267504 B21.00
Unity4,620.579 ns36.4441 ns32.3067 ns462.686.640.12972552 B106.33
Autofac11,448.774 ns109.1515 ns85.2183 ns1,149.4417.510.747714008 B583.67
'Hand Coded'9.394 ns0.2654 ns0.3056 ns1.000.000.001424 B1.00
'Pure.DI composition root'9.462 ns0.2354 ns0.2087 ns1.000.040.001424 B1.00
'Pure.DI Resolve<T>()'12.645 ns0.2946 ns0.2756 ns1.340.050.001424 B1.00
'Pure.DI Resolve(Type)'13.081 ns0.1891 ns0.1676 ns1.380.040.001424 B1.00
DryIoc70.358 ns1.4444 ns1.2804 ns7.410.270.0069120 B5.00
LightInject328.676 ns5.6607 ns4.7269 ns34.520.990.0291504 B21.00
Unity4,550.994 ns30.3968 ns26.9460 ns479.3813.310.14502552 B106.33
Autofac11,121.527 ns148.2118 ns138.6374 ns1,174.5728.550.808714008 B583.67
[Func details](readme/FuncDetails.md)
-
-Array - - - - - - - - - - - - -
Method Mean ErrorStdDevMedianRatioRatioSDGen0AllocatedAlloc Ratio
'Pure.DI composition root'241.2 ns6.22 ns17.96 ns242.1 ns1.000.100.0238632 B1.00
'Hand Coded'242.6 ns4.94 ns11.83 ns242.9 ns1.000.000.0238632 B1.00
'Pure.DI Resolve<T>()'250.5 ns6.13 ns17.60 ns250.7 ns1.050.090.0238632 B1.00
'Pure.DI Resolve(Type)'262.6 ns6.31 ns18.32 ns264.5 ns1.090.100.0238632 B1.00
LightInject268.9 ns10.84 ns29.66 ns264.2 ns1.090.090.0238632 B1.00
DryIoc271.4 ns5.53 ns16.05 ns271.7 ns1.130.090.0238632 B1.00
Unity16,147.7 ns372.62 ns1,038.71 ns16,193.5 ns66.635.500.549314520 B22.97
Autofac51,686.3 ns3,931.99 ns11,593.55 ns45,129.5 ns229.4054.231.098628816 B45.59
- -[Array details](readme/ArrayDetails.md) - -
-
Singleton - + - - - - - - - - - - - - + + + + + + + + + + + +
Method Mean Error StdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
Method Mean Error StdDev RatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Hand Coded'10.05 ns0.273 ns0.256 ns1.000.000.0013-24 B1.00
'Pure.DI composition root'10.56 ns0.194 ns0.172 ns1.050.030.0013-24 B1.00
'Pure.DI Resolve<T>()'13.35 ns0.291 ns0.272 ns1.330.050.0013-24 B1.00
'Pure.DI Resolve(Type)'13.98 ns0.361 ns0.320 ns1.390.040.0013-24 B1.00
DryIoc28.30 ns0.141 ns0.125 ns2.820.070.0013-24 B1.00
'Simple Injector'35.64 ns0.212 ns0.177 ns3.560.100.0013-24 B1.00
'Microsoft DI'39.29 ns0.257 ns0.227 ns3.920.100.0013-24 B1.00
LightInject880.93 ns2.642 ns2.342 ns87.862.290.0010-24 B1.00
Unity7,898.24 ns43.521 ns40.710 ns786.5323.400.1678-3184 B132.67
Autofac20,565.78 ns240.056 ns212.804 ns2,050.7937.881.28170.030524208 B1,008.67
'Castle Windsor'30,836.81 ns248.384 ns232.339 ns3,070.7289.051.2207-23912 B996.33
Ninject124,114.61 ns2,323.047 ns2,059.321 ns12,377.23311.243.90630.976674096 B3,087.33
'Hand Coded'8.469 ns0.2493 ns0.4165 ns1.000.000.0014-24 B1.00
'Pure.DI composition root'9.506 ns0.2733 ns0.3648 ns1.110.060.0014-24 B1.00
'Pure.DI Resolve<T>()'12.508 ns0.2986 ns0.2793 ns1.430.080.0014-24 B1.00
'Pure.DI Resolve(Type)'12.572 ns0.2674 ns0.2501 ns1.430.070.0014-24 B1.00
DryIoc28.755 ns0.2372 ns0.2219 ns3.280.150.0014-24 B1.00
'Simple Injector'35.304 ns0.2639 ns0.2060 ns3.990.190.0014-24 B1.00
'Microsoft DI'39.436 ns0.4113 ns0.3435 ns4.480.240.0014-24 B1.00
LightInject910.508 ns5.9297 ns5.2565 ns103.564.970.0010-24 B1.00
Unity7,927.580 ns29.0347 ns24.2453 ns900.8144.060.1831-3184 B132.67
Autofac19,562.149 ns236.3915 ns209.5549 ns2,224.3694.371.37330.030524208 B1,008.67
'Castle Windsor'31,009.123 ns327.3126 ns306.1684 ns3,531.38141.291.3428-23912 B996.33
Ninject120,850.129 ns2,359.7906 ns3,532.0234 ns14,228.15605.724.27251.098674096 B3,087.33
[Singleton details](readme/SingletonDetails.md)
-
-Enum - - - - - - - - - - - - - -
Method Mean ErrorStdDevMedianRatioRatioSDGen0AllocatedAlloc Ratio
'Pure.DI composition root'175.8 ns3.62 ns9.60 ns176.1 ns0.970.080.0131344 B1.00
'Pure.DI Resolve<T>()'176.9 ns3.61 ns8.37 ns178.0 ns0.980.070.0131344 B1.00
'Hand Coded'181.5 ns3.77 ns9.92 ns180.9 ns1.000.000.0131344 B1.00
'Pure.DI Resolve(Type)'185.6 ns3.81 ns8.99 ns184.7 ns1.020.070.0131344 B1.00
'Microsoft DI'308.0 ns20.95 ns61.78 ns276.8 ns1.760.350.0176472 B1.37
LightInject439.1 ns22.65 ns66.79 ns408.1 ns2.420.390.0324856 B2.49
DryIoc484.5 ns27.58 ns81.32 ns466.2 ns2.760.460.0324856 B2.49
Unity12,287.5 ns245.07 ns495.05 ns12,357.3 ns68.254.840.518813752 B39.98
Autofac48,070.2 ns2,330.57 ns6,379.91 ns46,378.6 ns265.5936.701.098628944 B84.14
- -[Enum details](readme/EnumDetails.md) - -
-
Transient - - - - - - - - - - - - + + + + + + + + + + + +
Method Mean Error StdDev RatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Pure.DI composition root'9.540 ns0.1055 ns0.0935 ns0.950.030.0013-24 B1.00
'Hand Coded'10.116 ns0.2824 ns0.3021 ns1.000.000.0013-24 B1.00
'Pure.DI Resolve<T>()'11.570 ns0.3141 ns0.3617 ns1.140.040.0013-24 B1.00
'Pure.DI Resolve(Type)'11.992 ns0.2704 ns0.2529 ns1.190.050.0013-24 B1.00
LightInject20.542 ns0.1679 ns0.1489 ns2.040.060.0013-24 B1.00
'Microsoft DI'25.624 ns0.1971 ns0.1747 ns2.550.080.0013-24 B1.00
DryIoc27.149 ns0.2081 ns0.1845 ns2.700.090.0013-24 B1.00
'Simple Injector'34.035 ns0.2053 ns0.1714 ns3.390.100.0013-24 B1.00
Unity11,144.949 ns62.3348 ns55.2582 ns1,107.6334.560.2747-5176 B215.67
Autofac30,281.347 ns396.4851 ns370.8724 ns3,005.07103.201.77000.061033224 B1,384.33
'Castle Windsor'60,466.436 ns209.8572 ns186.0330 ns6,009.57192.232.8687-54360 B2,265.00
Ninject270,253.848 ns5,217.8211 ns6,008.8505 ns26,671.30991.976.83591.4648131008 B5,458.67
'Hand Coded'8.300 ns0.2275 ns0.2017 ns1.000.000.0014-24 B1.00
'Pure.DI composition root'8.417 ns0.2472 ns0.2313 ns1.020.040.0014-24 B1.00
'Pure.DI Resolve<T>()'10.007 ns0.2170 ns0.1924 ns1.210.030.0014-24 B1.00
'Pure.DI Resolve(Type)'10.739 ns0.2942 ns0.4915 ns1.290.060.0014-24 B1.00
LightInject18.968 ns0.4292 ns0.3805 ns2.290.070.0014-24 B1.00
'Microsoft DI'24.761 ns0.2356 ns0.2089 ns2.980.070.0014-24 B1.00
DryIoc26.034 ns0.3170 ns0.2810 ns3.140.060.0014-24 B1.00
'Simple Injector'33.862 ns0.4485 ns0.3976 ns4.080.110.0014-24 B1.00
Unity11,055.904 ns85.9931 ns76.2306 ns1,332.6531.500.2899-5176 B215.67
Autofac28,686.734 ns523.7684 ns464.3070 ns3,458.02103.751.92260.091633224 B1,384.33
'Castle Windsor'57,113.574 ns417.0749 ns369.7260 ns6,883.84138.263.1128-54360 B2,265.00
Ninject259,310.814 ns5,082.3164 ns5,438.0217 ns31,238.771,101.537.32421.9531131008 B5,458.67
[Transient details](readme/TransientDetails.md) @@ -1134,7 +1045,7 @@ Installed [.NET SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)

 BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
+Intel Xeon Platinum 8175M CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
 .NET SDK 8.0.201
   [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
   DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
diff --git a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Array-report.html b/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Array-report.html
deleted file mode 100644
index dc19bd333..000000000
--- a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Array-report.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-Pure.DI.Benchmarks.Benchmarks.Array-20240412-095223
-
-
-
-
-

-BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
-.NET SDK 8.0.201
-  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-
-
- - - - - - - - - - - - - - - - -
Method Mean ErrorStdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Simple Injector'NANANA??NANANA?
'Microsoft DI'NANANA??NANANA?
'Castle Windsor'NANANA??NANANA?
NinjectNANANA??NANANA?
'Pure.DI Resolve<T>()'174.7 ns2.99 ns2.65 ns1.000.030.0336-632 B1.00
'Hand Coded'174.9 ns3.11 ns2.60 ns1.000.000.0336-632 B1.00
'Pure.DI composition root'176.0 ns3.55 ns4.35 ns1.010.030.0336-632 B1.00
'Pure.DI Resolve(Type)'177.2 ns2.47 ns2.06 ns1.010.010.0336-632 B1.00
DryIoc200.4 ns4.13 ns7.02 ns1.110.040.0334-632 B1.00
LightInject221.0 ns4.44 ns4.15 ns1.270.030.0336-632 B1.00
Unity10,213.1 ns173.93 ns154.19 ns58.490.700.7629-14520 B22.97
Autofac27,742.9 ns134.03 ns118.82 ns158.632.391.52590.061028816 B45.59
- - diff --git a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Enum-report.html b/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Enum-report.html deleted file mode 100644 index 944a84d60..000000000 --- a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Enum-report.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Pure.DI.Benchmarks.Benchmarks.Enum-20240412-095534 - - - - -

-BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
-.NET SDK 8.0.201
-  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-
-
- - - - - - - - - - - - - - - - -
Method Mean ErrorStdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Simple Injector'NANANA??NANANA?
'Castle Windsor'NANANA??NANANA?
NinjectNANANA??NANANA?
'Pure.DI Resolve(Type)'133.1 ns1.92 ns1.60 ns0.830.010.0184-344 B1.00
'Pure.DI Resolve<T>()'136.7 ns2.76 ns4.04 ns0.870.020.0184-344 B1.00
'Pure.DI composition root'147.2 ns1.87 ns1.56 ns0.920.020.0184-344 B1.00
'Hand Coded'160.4 ns3.02 ns2.68 ns1.000.000.0184-344 B1.00
'Microsoft DI'191.0 ns2.29 ns1.91 ns1.190.020.0250-472 B1.37
LightInject287.5 ns5.61 ns5.24 ns1.790.040.0458-856 B2.49
DryIoc290.3 ns5.81 ns6.22 ns1.800.050.0458-856 B2.49
Unity7,807.3 ns153.87 ns164.64 ns48.981.430.7324-13752 B39.98
Autofac28,057.8 ns201.48 ns168.25 ns175.322.371.52590.061028944 B84.14
- - diff --git a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Func-report.html b/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Func-report.html deleted file mode 100644 index 32b96e0cd..000000000 --- a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Func-report.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Pure.DI.Benchmarks.Benchmarks.Func-20240412-095838 - - - - -

-BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
-.NET SDK 8.0.201
-  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-
-
- - - - - - - - - - - - - - - - -
Method Mean ErrorStdDevRatioRatioSDGen0AllocatedAlloc Ratio
'Simple Injector'NANANA??NANA?
'Microsoft DI'NANANA??NANA?
'Castle Windsor'NANANA??NANA?
NinjectNANANA??NANA?
'Pure.DI composition root'9.795 ns0.1705 ns0.1424 ns0.980.020.001324 B1.00
'Hand Coded'9.988 ns0.1626 ns0.1441 ns1.000.000.001324 B1.00
'Pure.DI Resolve<T>()'12.079 ns0.1415 ns0.1255 ns1.210.020.001324 B1.00
'Pure.DI Resolve(Type)'12.984 ns0.1515 ns0.1417 ns1.300.020.001324 B1.00
DryIoc69.285 ns1.4315 ns1.4059 ns6.930.180.0063120 B5.00
LightInject325.360 ns5.2084 ns4.6171 ns32.580.570.0267504 B21.00
Unity4,620.579 ns36.4441 ns32.3067 ns462.686.640.12972552 B106.33
Autofac11,448.774 ns109.1515 ns85.2183 ns1,149.4417.510.747714008 B583.67
- - diff --git a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Singleton-report.html b/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Singleton-report.html deleted file mode 100644 index 55ff3d7ef..000000000 --- a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Singleton-report.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Pure.DI.Benchmarks.Benchmarks.Singleton-20240412-100141 - - - - -

-BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
-.NET SDK 8.0.201
-  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-
-
- - - - - - - - - - - - - - - - -
Method Mean Error StdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Hand Coded'10.05 ns0.273 ns0.256 ns1.000.000.0013-24 B1.00
'Pure.DI composition root'10.56 ns0.194 ns0.172 ns1.050.030.0013-24 B1.00
'Pure.DI Resolve<T>()'13.35 ns0.291 ns0.272 ns1.330.050.0013-24 B1.00
'Pure.DI Resolve(Type)'13.98 ns0.361 ns0.320 ns1.390.040.0013-24 B1.00
DryIoc28.30 ns0.141 ns0.125 ns2.820.070.0013-24 B1.00
'Simple Injector'35.64 ns0.212 ns0.177 ns3.560.100.0013-24 B1.00
'Microsoft DI'39.29 ns0.257 ns0.227 ns3.920.100.0013-24 B1.00
LightInject880.93 ns2.642 ns2.342 ns87.862.290.0010-24 B1.00
Unity7,898.24 ns43.521 ns40.710 ns786.5323.400.1678-3184 B132.67
Autofac20,565.78 ns240.056 ns212.804 ns2,050.7937.881.28170.030524208 B1,008.67
'Castle Windsor'30,836.81 ns248.384 ns232.339 ns3,070.7289.051.2207-23912 B996.33
Ninject124,114.61 ns2,323.047 ns2,059.321 ns12,377.23311.243.90630.976674096 B3,087.33
- - diff --git a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Transient-report.html b/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Transient-report.html deleted file mode 100644 index 7d2d0ab60..000000000 --- a/benchmarks/data/results/Pure.DI.Benchmarks.Benchmarks.Transient-report.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Pure.DI.Benchmarks.Benchmarks.Transient-20240412-100607 - - - - -

-BenchmarkDotNet v0.13.12, Ubuntu 20.04.6 LTS (Focal Fossa)
-Intel Xeon Platinum 8259CL CPU 2.50GHz, 1 CPU, 2 logical cores and 1 physical core
-.NET SDK 8.0.201
-  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX-512F+CD+BW+DQ+VL
-
-
- - - - - - - - - - - - - - - - -
Method Mean Error StdDev RatioRatioSDGen0Gen1AllocatedAlloc Ratio
'Pure.DI composition root'9.540 ns0.1055 ns0.0935 ns0.950.030.0013-24 B1.00
'Hand Coded'10.116 ns0.2824 ns0.3021 ns1.000.000.0013-24 B1.00
'Pure.DI Resolve<T>()'11.570 ns0.3141 ns0.3617 ns1.140.040.0013-24 B1.00
'Pure.DI Resolve(Type)'11.992 ns0.2704 ns0.2529 ns1.190.050.0013-24 B1.00
LightInject20.542 ns0.1679 ns0.1489 ns2.040.060.0013-24 B1.00
'Microsoft DI'25.624 ns0.1971 ns0.1747 ns2.550.080.0013-24 B1.00
DryIoc27.149 ns0.2081 ns0.1845 ns2.700.090.0013-24 B1.00
'Simple Injector'34.035 ns0.2053 ns0.1714 ns3.390.100.0013-24 B1.00
Unity11,144.949 ns62.3348 ns55.2582 ns1,107.6334.560.2747-5176 B215.67
Autofac30,281.347 ns396.4851 ns370.8724 ns3,005.07103.201.77000.061033224 B1,384.33
'Castle Windsor'60,466.436 ns209.8572 ns186.0330 ns6,009.57192.232.8687-54360 B2,265.00
Ninject270,253.848 ns5,217.8211 ns6,008.8505 ns26,671.30991.976.83591.4648131008 B5,458.67
- - diff --git a/build/BenchmarksTarget.cs b/build/BenchmarksTarget.cs index f548c9231..c414d7271 100644 --- a/build/BenchmarksTarget.cs +++ b/build/BenchmarksTarget.cs @@ -51,7 +51,7 @@ public Task RunAsync(CancellationToken cancellationToken) var reportFile = $"{index++:00} {Path.GetFileName(originalReportFile).Replace("Pure.DI.Benchmarks.Benchmarks.", "").Replace("-report", "")}"; reportFile = Path.Combine(logsDirectory, reportFile); File.Copy(originalReportFile, reportFile, true); - artifactsWriter.PublishArtifact($"{reportFile} => ."); + artifactsWriter.PublishArtifact($"{originalReportFile} => ."); } return Task.FromResult(0); diff --git a/build/build.csproj b/build/build.csproj index d7d411f19..c0a5c6857 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Avalonia.md b/readme/Avalonia.md index c8258c7bf..9a53c081f 100644 --- a/readme/Avalonia.md +++ b/readme/Avalonia.md @@ -107,7 +107,7 @@ The [project file](/samples/AvaloniaApp/AvaloniaApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorServerApp.md b/readme/BlazorServerApp.md index b5800cd87..b3b7863a1 100644 --- a/readme/BlazorServerApp.md +++ b/readme/BlazorServerApp.md @@ -68,7 +68,7 @@ The [project file](/samples/BlazorServerApp/BlazorServerApp.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index 008f0e535..decf7524d 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -67,7 +67,7 @@ The [project file](/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj) lo - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Console.md b/readme/Console.md index c4f34b3c0..f8b1d69c5 100644 --- a/readme/Console.md +++ b/readme/Console.md @@ -90,7 +90,7 @@ The [project file](/samples/ShroedingersCat/ShroedingersCat.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleNativeAOT.md b/readme/ConsoleNativeAOT.md index cd6ed4ad3..69bd06d1c 100644 --- a/readme/ConsoleNativeAOT.md +++ b/readme/ConsoleNativeAOT.md @@ -16,7 +16,7 @@ The [project file](/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.cs - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleTopLevelStatements.md b/readme/ConsoleTopLevelStatements.md index 06565308d..26091711e 100644 --- a/readme/ConsoleTopLevelStatements.md +++ b/readme/ConsoleTopLevelStatements.md @@ -78,7 +78,7 @@ The [project file](/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTop - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/GrpcService.md b/readme/GrpcService.md index 83d12586a..435bbcf48 100644 --- a/readme/GrpcService.md +++ b/readme/GrpcService.md @@ -53,7 +53,7 @@ The [project file](/samples/GrpcService/GrpcService.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Maui.md b/readme/Maui.md index c576028c2..f1eb55fc7 100644 --- a/readme/Maui.md +++ b/readme/Maui.md @@ -208,7 +208,7 @@ The [project file](/samples/MAUIApp/MAUIApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/MinimalWebAPI.md b/readme/MinimalWebAPI.md index 5d1e055f3..44c5212e6 100644 --- a/readme/MinimalWebAPI.md +++ b/readme/MinimalWebAPI.md @@ -76,7 +76,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WebAPI.md b/readme/WebAPI.md index 7c9e9f435..903b81fc3 100644 --- a/readme/WebAPI.md +++ b/readme/WebAPI.md @@ -51,7 +51,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WebApp.md b/readme/WebApp.md index 8a33fc3a1..1081a6303 100644 --- a/readme/WebApp.md +++ b/readme/WebApp.md @@ -51,7 +51,7 @@ The [project file](/samples/WebApp/WebApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsApp.md b/readme/WinFormsApp.md index 1a732608b..59535e9c7 100644 --- a/readme/WinFormsApp.md +++ b/readme/WinFormsApp.md @@ -55,7 +55,7 @@ The [project file](/samples/WinFormsApp/WinFormsApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsAppNetCore.md b/readme/WinFormsAppNetCore.md index 883c507a4..8ae490b9a 100644 --- a/readme/WinFormsAppNetCore.md +++ b/readme/WinFormsAppNetCore.md @@ -62,7 +62,7 @@ The [project file](/samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj) looks - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Wpf.md b/readme/Wpf.md index bf4fcb929..35027c53f 100644 --- a/readme/Wpf.md +++ b/readme/Wpf.md @@ -68,7 +68,7 @@ The [project file](/samples/WpfAppNetCore/WpfAppNetCore.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/Clock.Tests/Clock.Tests.csproj b/samples/Clock.Tests/Clock.Tests.csproj index 90ecb6680..992d7143e 100644 --- a/samples/Clock.Tests/Clock.Tests.csproj +++ b/samples/Clock.Tests/Clock.Tests.csproj @@ -9,8 +9,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Pure.DI.Core/Components/Api.g.cs b/src/Pure.DI.Core/Components/Api.g.cs index 06b4b8106..255ac06a5 100644 --- a/src/Pure.DI.Core/Components/Api.g.cs +++ b/src/Pure.DI.Core/Components/Api.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable #if !NET40_OR_GREATER && !NETSTANDARD2_0_OR_GREATER && !NETCOREAPP2_0_OR_GREATER diff --git a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs index 5707dffbe..62ddcf5be 100644 --- a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs +++ b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable namespace Pure.DI { diff --git a/src/Pure.DI.Core/Features/Default.g.cs b/src/Pure.DI.Core/Features/Default.g.cs index 5bea645a7..714a1fd91 100644 --- a/src/Pure.DI.Core/Features/Default.g.cs +++ b/src/Pure.DI.Core/Features/Default.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable namespace Pure.DI diff --git a/src/Pure.DI.Core/Pure.DI.Core.csproj b/src/Pure.DI.Core/Pure.DI.Core.csproj index 1bf3dfe01..cfac5241f 100644 --- a/src/Pure.DI.Core/Pure.DI.Core.csproj +++ b/src/Pure.DI.Core/Pure.DI.Core.csproj @@ -2,11 +2,11 @@ $(BasePackageId) - $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V1 + $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V2 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj b/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj index df2f4eb75..9cee1b513 100644 --- a/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj +++ b/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Pure.DI.Tests/Pure.DI.Tests.csproj b/tests/Pure.DI.Tests/Pure.DI.Tests.csproj index 2fdd390b8..1cc775e8d 100644 --- a/tests/Pure.DI.Tests/Pure.DI.Tests.csproj +++ b/tests/Pure.DI.Tests/Pure.DI.Tests.csproj @@ -4,8 +4,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj index 275d97cf9..5df764e98 100644 --- a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj +++ b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive