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

Performance for v6.0 #1127

Closed
2 of 3 tasks
alistairjevans opened this issue May 28, 2020 · 7 comments
Closed
2 of 3 tasks

Performance for v6.0 #1127

alistairjevans opened this issue May 28, 2020 · 7 comments
Milestone

Comments

@alistairjevans
Copy link
Member

alistairjevans commented May 28, 2020

There's a few things left to do from a performance perspective following the pipelines changes.

  • Run profiler on all the various benchmark cases to see if there are additional optimizations
  • CircularDependencyMiddleware.Execute stack sees PushWithResize a bit, might be worth allocating some memory up front
  • ResolveOperationBase.ResetSuccessfulRequests resets the list with new, but would it be better to Clear() or something else?
@alistairjevans alistairjevans added this to the v6.0 milestone May 28, 2020
@alistairjevans
Copy link
Member Author

Addressed the ResetSuccessfulRequests item in #1131.

@alistairjevans
Copy link
Member Author

Addressed the Circular Dependency item in #1148.

@alistairjevans
Copy link
Member Author

Run the full benchmark set against develop vs v6; used the benchmark comparer tool used in the dotnet runtime; high-level view of the current state of play is below.

Priority next is to figure out the concurrency problem, then I can look at the others.

summary:
better: 42, geomean: 1.062
worse: 14, geomean: 1.052
total diff: 56

Slower diff/base Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.ConcurrencyBenchmark.MultipleResolvesOnMultipleTasks(ResolveT 1.10 2035909.77 2242665.63
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveEnumer 1.06 5138.37 5456.89
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.05 4653.39 4907.33
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveEnumerableT(re 1.05 5125.31 5388.90
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.05 4667.69 4904.86
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.05 3025.03 3162.98
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveArray 1.04 2336.60 2438.25
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.04 5195.11 5402.66
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.04 2745.87 2847.57
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.03 3864.54 3975.54
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveEnumer 1.03 7344.87 7529.92
Faster base/diff Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.ChildScopeResolveBenchmark.Resolve 1.44 37096.94 25844.49
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 3) 1.16 2643.28 2276.41
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 1) 1.13 1304.37 1156.98
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 2) 1.11 1989.94 1797.30
Autofac.Benchmarks.RootContainerResolveBenchmark.NonSharedReflectionResolve 1.10 317.81 287.67
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.10 4489.82 4072.85
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 2) 1.10 1705.15 1551.25
Autofac.Benchmarks.OpenGenericBenchmark.ResolveOpenGeneric 1.10 317.77 289.73
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.10 2667.47 2432.32
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 3) 1.09 2206.29 2028.12
Autofac.Benchmarks.DeepGraphResolveBenchmark.Resolve 1.09 10766.75 9921.63
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 3) 1.07 4907.97 4585.59
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 2) 1.07 2515.58 2352.55
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 2) 1.06 3491.33 3285.72
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.Baseline 1.06 586.06 555.25
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveT(repetitions: 3) 1.05 2817.72 2676.44
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.05 1999.43 1902.65
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveT(repetitions: 2) 1.05 2105.48 2008.64
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 3) 1.05 3351.56 3200.88
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.04 4092.78 3921.58
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.04 4318.43 4141.75
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.04 2354.65 2265.44
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.04 7905.66 7618.26
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.04 3201.67 3086.90
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveEnumerableT(repetit 1.04 5217.74 5040.58
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.03 3308.72 3197.97
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 1) 1.03 1545.47 1493.87
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.03 2461.61 2380.57
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 1) 1.03 1136.17 1098.92
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.03 2376.59 2300.45
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.03 6203.52 6008.95
Autofac.Benchmarks.RootContainerResolveBenchmark.SharedResolve 1.03 230.09 222.96
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.03 3440.22 3333.79
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.03 4376.58 4259.14
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.03 4189.77 4079.60
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.03 5458.68 5320.08
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.Baseline 1.03 573.27 558.98
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.02 10960.85 10697.01
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.Baseline 1.02 570.93 557.62
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Baselin 1.02 573.29 559.99
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 1) 1.02 2069.40 2021.45
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.Baseline 1.02 572.17 559.36

@alistairjevans
Copy link
Member Author

Latest benchmark state following the merge of the concurrency changes. Almost everything looks good across the board, particularly on concurrency now.

Of the three slower ones, 1 is a baseline, so is just margin-of-error. The other 2 I'm not sure. I'm going to run another test set overnight to check for random slowness.

summary:
better: 57, geomean: 1.096
worse: 3, geomean: 1.057
total diff: 60

Slower diff/base Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.06 1478.60 1573.07
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Baselin 1.06 566.39 598.25
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.05 4640.93 4878.58
Faster base/diff Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.ConcurrencyBenchmark.MultipleResolvesOnMultipleTasks(ResolveT 3.86 2262458.59 586609.38
Autofac.Benchmarks.ConcurrencyNestedScopeBenchmark.MultipleResolvesOnMultipleTas 1.55 1789352.34 1154516.31
Autofac.Benchmarks.ChildScopeResolveBenchmark.Resolve 1.21 37288.99 30785.69
Autofac.Benchmarks.OpenGenericBenchmark.ResolveOpenGeneric 1.17 316.39 271.40
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 2) 1.15 1960.18 1702.89
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 3) 1.14 2609.28 2280.55
Autofac.Benchmarks.DeepGraphResolveBenchmark.Resolve 1.14 10821.08 9465.21
Autofac.Benchmarks.RootContainerResolveBenchmark.NonSharedReflectionResolve 1.14 320.30 280.18
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 1) 1.12 1286.50 1151.77
Autofac.Benchmarks.RootContainerResolveBenchmark.SharedResolve 1.11 228.85 205.42
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.11 6351.26 5708.08
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 2) 1.10 3540.65 3233.03
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 2) 1.09 1701.10 1557.49
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.09 4434.53 4061.94
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 3) 1.09 2198.32 2017.19
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 3) 1.08 3373.30 3111.80
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.08 7896.83 7298.65
Autofac.Benchmarks.RootContainerResolveBenchmark.NonSharedDelegateResolve 1.08 255.60 237.64
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 3) 1.07 4852.50 4519.68
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveIEnumerable 1.07 2407.37 2249.44
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.07 2590.30 2429.90
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.07 4237.61 3976.52
Autofac.Benchmarks.PropertyInjectionBenchmark.Resolve 1.06 3402.31 3196.07
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.06 7597.10 7148.11
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveT(repetitions: 2) 1.06 2093.17 1972.37
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.05 3025.36 2870.20
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.05 5471.79 5199.44
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveEnumerableT(repetiti 1.05 10830.00 10306.30
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.05 7134.39 6792.39
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 1) 1.05 1138.58 1084.39
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.05 4557.63 4348.21
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.05 10182.93 9717.97
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 2) 1.05 2463.45 2351.00
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 1) 1.05 2081.60 1987.38
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveEnumerableT(re 1.05 5229.77 4993.42
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveEnumer 1.04 7578.60 7256.34
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.04 10153.85 9724.97
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveEnumer 1.04 9926.37 9542.07
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveT(repe 1.04 1758.78 1690.76
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveArray 1.04 2341.57 2251.88
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 1) 1.04 1529.42 1476.45
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.04 3322.34 3209.43
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveEnumer 1.03 4766.18 4609.39
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveT(repetitions: 3) 1.03 3050.88 2951.32
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveIReadOnlyList 1.03 2371.52 2294.33
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.03 2309.76 2235.37
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.Baseline 1.03 573.79 555.94
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.03 4304.76 4176.87
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveT(repe 1.03 2414.56 2343.91
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.03 2267.81 2201.65
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveT(repetitions: 3) 1.03 2792.09 2714.84
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.03 3134.58 3050.21
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.Baseline 1.03 577.48 562.06
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.03 1952.38 1900.34
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveEnumer 1.03 3520.04 3429.65
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.02 2442.30 2385.32
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.02 2299.52 2249.40

@alistairjevans
Copy link
Member Author

Re-ran the benchmarks, got only 1 slower bench this time, and it was a completely different one, so I'm putting it down to small variations in processor behaviour between runs.

Given the current results, I'll consider any v6-introduced perf issues resolved, so any additional fixes will be just nice-to-haves.

@alistairjevans
Copy link
Member Author

alistairjevans commented Aug 6, 2020

Last compare I ran vs develop gives me:

Slower diff/base Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveEnumer 1.12 5289.50 5936.32
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveEnumerableT(re 1.11 5106.41 5656.61
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.11 6984.64 7723.15
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveEnumer 1.11 6929.84 7659.30
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.09 5198.02 5687.89
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveEnumer 1.09 7395.35 8085.69
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveEnumerableT(re 1.09 2993.20 3260.87
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.09 1741.86 1897.29
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveEnumerableT(repetit 1.09 7173.09 7799.53
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.09 3358.58 3644.37
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveT(repe 1.08 2975.56 3207.52
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 1) 1.08 1546.44 1665.29
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.08 5412.74 5819.84
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.08 9738.04 10469.71
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveEnumerableT(re 1.07 7443.30 7999.24
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.07 2334.15 2500.54
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.07 4686.70 5013.87
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.07 4745.07 5070.16
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveEnumerableT(repetit 1.07 5091.72 5435.94
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveT(repe 1.07 1770.56 1889.01
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.07 2296.49 2449.77
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.06 3048.30 3241.26
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.06 3952.51 4198.74
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.06 6646.74 7037.44
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.06 3401.83 3601.17
Autofac.Benchmarks.PropertyInjectionBenchmark.Resolve 1.06 3353.45 3542.90
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.06 3135.55 3311.15
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveT(repetitions: 2) 1.05 2252.59 2375.24
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.ResolveT(repetitions: 1) 1.05 2080.02 2190.44
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveT(repe 1.05 2385.36 2503.88
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.05 4540.03 4760.67
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.05 4407.20 4609.90
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.05 5406.86 5653.86
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveEnumerableT(repetit 1.04 2952.82 3080.29
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Resolve 1.04 2999.52 3122.46
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveIEnumerable 1.04 2345.06 2440.97
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.04 10556.76 10983.51
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.Baseline 1.04 568.22 590.56
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.ResolveT(repetitions: 1.04 2346.36 2434.85
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.ResolveEnumer 1.04 3521.21 3646.97
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveIReadOnlyList 1.04 2365.56 2450.02
Autofac.Benchmarks.EnumerableResolveBenchmark.ResolveArray 1.03 2326.13 2402.25
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveEnumerableT(repetition 1.03 2320.76 2395.38
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.03 3278.85 3383.22
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.ResolveT(repe 1.03 3427.46 3525.42
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveEnumerableT(repetiti 1.03 7702.50 7918.60
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Resolve 1.03 4284.67 4403.88
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.ResolveT(repetitions: 1) 1.03 1445.59 1485.55
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveEnumerableT(re 1.03 7165.92 7354.69
Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark.ResolveT(repetitions: 1.03 1974.50 2025.49
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark.Baseline 1.02 567.96 581.66
Autofac.Benchmarks.Decorators.KeyedNestedBenchmark.ResolveEnumerableT(repetition 1.02 2733.55 2799.04
Faster base/diff Base Median (ns) Diff Median (ns) Modality
Autofac.Benchmarks.ConcurrencyBenchmark.MultipleResolvesOnMultipleTasks(ResolveT 3.52 2062864.06 586467.43
Autofac.Benchmarks.ConcurrencyNestedScopeBenchmark.MultipleResolvesOnMultipleTas 1.50 1650029.69 1096497.46
Autofac.Benchmarks.MultiConstructorBenchmark.TwoValidOneInvalid 1.46 1878.74 1286.00
Autofac.Benchmarks.MultiConstructorBenchmark.Four 1.36 2752.99 2021.12
Autofac.Benchmarks.MultiConstructorBenchmark.Two 1.36 1411.30 1036.68
Autofac.Benchmarks.MultiConstructorBenchmark.Three 1.35 2033.58 1510.97
Autofac.Benchmarks.MultiConstructorBenchmark.Single 1.15 673.17 584.26
Autofac.Benchmarks.RootContainerResolveBenchmark.OperatorNew 1.15 2.56 2.22
Autofac.Benchmarks.ChildScopeResolveBenchmark.Resolve 1.15 37873.60 33039.14
Autofac.Benchmarks.OpenGenericBenchmark.ResolveOpenGeneric 1.11 318.22 285.79
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 3) 1.10 2642.26 2394.73
Autofac.Benchmarks.RootContainerResolveBenchmark.NonSharedReflectionResolve 1.10 314.94 286.98
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 1) 1.10 1289.60 1175.41
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveT(repetitions: 2) 1.10 2004.94 1828.28
Autofac.Benchmarks.RootContainerResolveBenchmark.SharedResolve 1.08 231.29 213.55
Autofac.Benchmarks.DeepGraphResolveBenchmark.Resolve 1.05 10870.40 10360.91
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.05 4403.89 4210.49
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 2) 1.04 1694.67 1624.34
Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark.ResolveT(repetitions: 2) 1.03 2504.42 2420.22
Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark.Baseline 1.03 571.32 554.99
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark.Baselin 1.03 574.75 558.68
Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark.Baseline 1.03 573.09 557.08
Autofac.Benchmarks.Decorators.KeylessGenericBenchmark.Baseline 1.03 568.90 553.70
Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark.Baselin 1.03 570.07 555.03
Autofac.Benchmarks.Decorators.KeylessNestedBenchmark.Baseline 1.03 572.83 558.32
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.ResolveEnumerableT(repetitio 1.02 6268.45 6118.36
Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark.ResolveT(repetitions: 3) 1.02 2222.27 2169.24
Autofac.Benchmarks.Decorators.KeyedGenericBenchmark.Baseline 1.02 572.20 558.87

This makes me a bit sad because at one point almost all of them were faster at one point. I'll take a look at what's going on, but it might just be the known overhead of a few of the paths.

@alistairjevans
Copy link
Member Author

As of #1194, performance is now faster almost across-the-board, barring some margin-of-error variations.

I'm going to close this now, and barring any urgent stuff, I'm going to suggest we freeze further Autofac changes, and focus on getting v6 out the door.

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

No branches or pull requests

1 participant