Skip to content

Commit 8faa488

Browse files
author
electricessence
committed
Valdation updates.
1 parent 88ef50a commit 8faa488

9 files changed

Lines changed: 152 additions & 190 deletions

benchmarking/Benchmark.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Open.Diagnostics;
22
using System;
33
using System.Collections.Generic;
4+
using System.Diagnostics;
45
using System.Threading.Tasks;
56

67
namespace Open.Disposable.ObjectPools
@@ -12,6 +13,8 @@ public Benchmark(uint size, uint repeat, Func<IObjectPool<T>> poolFactory) : bas
1213
{
1314
// Because some pools do comparison checks on values, we have have unique instances/values.
1415
_items = new T[(int)size];
16+
var pool = Param();
17+
Parallel.For(0, TestSize, i => _items[i] = pool.Take());
1518
}
1619

1720
readonly T[] _items;
@@ -21,14 +24,16 @@ protected override IEnumerable<TimedResult> TestOnceInternal()
2124
using (var pool = Param())
2225
{
2326

24-
yield return TimedResult.Measure("Take From Empty (In Parallel)", () =>
25-
{
26-
Parallel.For(0, TestSize, i => _items[i] = pool.Take());
27-
});
27+
//yield return TimedResult.Measure("Take From Empty (In Parallel)", () =>
28+
//{
29+
// Parallel.For(0, TestSize, i => _items[i] = pool.Take());
30+
//});
2831

2932
yield return TimedResult.Measure("Give To (In Parallel)", () =>
3033
{
3134
Parallel.For(0, TestSize, i => pool.Give(_items[i]));
35+
var count = pool.Count;
36+
Debug.Assert(pool is OptimisticArrayObjectPool<T> || count == TestSize, $"Expected {TestSize}, acutal count: {count}");
3237
});
3338

3439
yield return TimedResult.Measure("Mixed 90%-Take/10%-Give (In Parallel)", () =>

benchmarking/BenchmarkResult.csv

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
Batch,Pool Type," From Empty (In Parallel)"," To (In Parallel)",d 90%-Take/10%-Give (In Parallel),d 50%-Take/50%-Give (In Parallel),d 10%-Take/90%-Give (In Parallel),y Pool (.TryTake()),L,
2-
Repeat 800000 for size 4,ConcurrentQueueObjectPool,00:00:02.1768070,00:00:01.6760555,00:00:01.7056065,00:00:01.6512698,00:00:01.6459856,00:00:00.0942697,00:00:08.9499941,
3-
Repeat 800000 for size 4,ConcurrentStackObjectPool,00:00:02.0861011,00:00:01.9051266,00:00:01.7180590,00:00:01.6934710,00:00:01.8172521,00:00:00.0935848,00:00:09.3135946,
4-
Repeat 800000 for size 4,OptimisticArrayObjectPool,00:00:02.1028619,00:00:01.7289187,00:00:01.7391071,00:00:01.7308129,00:00:01.7911409,00:00:00.0850814,00:00:09.1779229,
5-
Repeat 320000 for size 10,ConcurrentQueueObjectPool,00:00:01.4097002,00:00:01.0808791,00:00:01.0795562,00:00:01.0359202,00:00:01.0900044,00:00:00.1022724,00:00:05.7983325,
6-
Repeat 320000 for size 10,ConcurrentStackObjectPool,00:00:01.3884640,00:00:01.2335304,00:00:01.0874214,00:00:01.0858229,00:00:01.1916481,00:00:00.1097261,00:00:06.0966129,
7-
Repeat 320000 for size 10,OptimisticArrayObjectPool,00:00:01.3395438,00:00:01.0630741,00:00:01.0581905,00:00:01.0257850,00:00:01.0596437,00:00:00.1231254,00:00:05.6693625,
8-
Repeat 96000 for size 50,ConcurrentQueueObjectPool,00:00:00.6724161,00:00:00.9303053,00:00:00.6667530,00:00:00.4869434,00:00:00.5629880,00:00:00.1474862,00:00:03.4668920,
9-
Repeat 96000 for size 50,ConcurrentStackObjectPool,00:00:00.6404036,00:00:00.7253187,00:00:00.5973183,00:00:00.5004547,00:00:00.6653687,00:00:00.1585221,00:00:03.2873861,
10-
Repeat 96000 for size 50,OptimisticArrayObjectPool,00:00:00.6273288,00:00:00.6296415,00:00:00.5758157,00:00:00.4575284,00:00:00.5484878,00:00:00.3576192,00:00:03.1964214,
11-
Repeat 64000 for size 100,ConcurrentQueueObjectPool,00:00:00.5739788,00:00:00.8879708,00:00:00.6868932,00:00:00.5038095,00:00:00.6414144,00:00:00.1906175,00:00:03.4846842,
12-
Repeat 64000 for size 100,ConcurrentStackObjectPool,00:00:00.5710317,00:00:00.8181417,00:00:02.3020598,00:00:00.5377935,00:00:00.7552635,00:00:00.2106115,00:00:05.1949017,
13-
Repeat 64000 for size 100,OptimisticArrayObjectPool,00:00:00.5741654,00:00:00.6708564,00:00:00.6465793,00:00:00.4123009,00:00:00.5587647,00:00:00.5961525,00:00:03.4588192,
14-
Repeat 51200 for size 250,ConcurrentQueueObjectPool,00:00:00.7338318,00:00:02.7582430,00:00:01.3118591,00:00:00.8866236,00:00:01.2641219,00:00:00.3621620,00:00:07.3168414,
15-
Repeat 51200 for size 250,ConcurrentStackObjectPool,00:00:00.7063932,00:00:01.4843162,00:00:04.0788532,00:00:01.6259396,00:00:01.3564185,00:00:00.4047656,00:00:09.6566863,
16-
Repeat 51200 for size 250,OptimisticArrayObjectPool,00:00:00.7798597,00:00:01.3369029,00:00:01.3656621,00:00:00.6762451,00:00:01.0179464,00:00:01.8689033,00:00:07.0455195,
17-
Repeat 12800 for size 2000,ConcurrentQueueObjectPool,00:00:00.7690881,00:00:02.9469849,00:00:02.0202982,00:00:01.3725082,00:00:02.1013278,00:00:00.6418618,00:00:09.8520690,
18-
Repeat 12800 for size 2000,ConcurrentStackObjectPool,00:00:00.6845217,00:00:02.5773779,00:00:04.7847969,00:00:04.7546912,00:00:03.4618654,00:00:00.6506477,00:00:16.9139008,
19-
Repeat 12800 for size 2000,OptimisticArrayObjectPool,00:00:00.7170882,00:00:07.3855602,00:00:07.4918848,00:00:01.1312204,00:00:04.8420972,00:00:13.1760797,00:00:34.7439305,
1+
Batch,Pool Type," To (In Parallel)",d 90%-Take/10%-Give (In Parallel),d 50%-Take/50%-Give (In Parallel),d 10%-Take/90%-Give (In Parallel),y Pool (.TryTake()),L,
2+
Repeat 400000 for size 4,ConcurrentQueueObjectPool,00:00:01.8472469,00:00:01.7363986,00:00:01.6837968,00:00:01.7096510,00:00:00.1076125,00:00:07.0847058,
3+
Repeat 400000 for size 4,ConcurrentStackObjectPool,00:00:01.8102817,00:00:01.7426871,00:00:01.6518815,00:00:01.8414613,00:00:00.1049529,00:00:07.1512645,
4+
Repeat 400000 for size 4,OptimisticArrayObjectPool,00:00:01.8589242,00:00:01.7585402,00:00:01.7489384,00:00:01.7687298,00:00:00.0952550,00:00:07.2303876,
5+
Repeat 160000 for size 10,ConcurrentQueueObjectPool,00:00:00.7782376,00:00:00.7324783,00:00:00.7163121,00:00:00.7306797,00:00:00.0971813,00:00:03.0548890,
6+
Repeat 160000 for size 10,ConcurrentStackObjectPool,00:00:00.9064832,00:00:00.7690028,00:00:00.7207622,00:00:00.8417267,00:00:00.1034971,00:00:03.3414720,
7+
Repeat 160000 for size 10,OptimisticArrayObjectPool,00:00:00.8577028,00:00:00.7887449,00:00:00.7333412,00:00:00.8531175,00:00:00.1088223,00:00:03.3417287,
8+
Repeat 48000 for size 50,ConcurrentQueueObjectPool,00:00:00.4952668,00:00:00.3843341,00:00:00.3179560,00:00:00.3515590,00:00:00.1171762,00:00:01.6662921,
9+
Repeat 48000 for size 50,ConcurrentStackObjectPool,00:00:00.5346734,00:00:00.3824365,00:00:00.3211063,00:00:00.4865511,00:00:00.1248121,00:00:01.8495794,
10+
Repeat 48000 for size 50,OptimisticArrayObjectPool,00:00:00.5833078,00:00:00.4477068,00:00:00.3296106,00:00:00.4408652,00:00:00.3016180,00:00:02.1031084,
11+
Repeat 32000 for size 100,ConcurrentQueueObjectPool,00:00:00.4969536,00:00:00.4326518,00:00:00.3199614,00:00:00.4396957,00:00:00.1608001,00:00:01.8500626,
12+
Repeat 32000 for size 100,ConcurrentStackObjectPool,00:00:00.5521412,00:00:00.4853524,00:00:00.3175640,00:00:00.5159456,00:00:00.1572408,00:00:02.0282440,
13+
Repeat 32000 for size 100,OptimisticArrayObjectPool,00:00:00.7719640,00:00:00.5488668,00:00:00.2717297,00:00:00.5357692,00:00:00.6489823,00:00:02.7773120,
14+
Repeat 25600 for size 250,ConcurrentQueueObjectPool,00:00:00.7980353,00:00:00.6178042,00:00:00.5431682,00:00:00.6892625,00:00:00.2954847,00:00:02.9437549,
15+
Repeat 25600 for size 250,ConcurrentStackObjectPool,00:00:00.9389921,00:00:00.9667758,00:00:00.5609015,00:00:00.8204988,00:00:00.3075525,00:00:03.5947207,
16+
Repeat 25600 for size 250,OptimisticArrayObjectPool,00:00:02.1193418,00:00:01.3828499,00:00:00.4523577,00:00:01.3159924,00:00:02.9909843,00:00:08.2615261,
17+
Repeat 6400 for size 2000,ConcurrentQueueObjectPool,00:00:01.3830355,00:00:00.9243686,00:00:00.9780430,00:00:00.9865309,00:00:00.5832766,00:00:04.8552546,
18+
Repeat 6400 for size 2000,ConcurrentStackObjectPool,00:00:01.6064533,00:00:02.5455114,00:00:01.2388087,00:00:01.5112497,00:00:00.5781890,00:00:07.4802121,
19+
Repeat 6400 for size 2000,OptimisticArrayObjectPool,00:00:13.5147753,00:00:15.1956294,00:00:00.9013497,00:00:12.0385696,00:00:32.8558145,00:01:14.5061385,
20+
for size 2000,ConcurrentStackObjectPool,00:00:01.4597004,00:00:01.7435741,00:00:02.4213177,00:00:01.0803513,00:00:01.6261815,00:00:00.6094295,00:00:08.9405545,
21+
Repeat 6400 for size 2000,OptimisticArrayObjectPool,00:00:01.2265087,00:00:23.0488821,00:00:15.8054484,00:00:00.9435990,00:00:14.8800972,00:00:51.4640465,00:01:47.3685819,
22+
,
2023
epeat 51200 for size 250,OptimisticArrayObjectPool,00:00:00.7651948,00:00:01.3195712,00:00:01.3758641,00:00:00.6837150,00:00:01.0134658,00:00:01.9616149,00:00:07.1194258,
2124
Repeat 51200 for size 250,InterlockedArrayObjectPool,00:00:00.8386708,00:00:02.2800174,00:00:01.4244575,00:00:00.6435472,00:00:01.6845873,00:00:05.4327218,00:00:12.3040020,
2225
Repeat 12800 for size 2000,ConcurrentQueueObjectPool,00:00:00.7692018,00:00:03.0317303,00:00:02.0615927,00:00:01.3597065,00:00:02.0767858,00:00:00.6488593,00:00:09.9478764,

benchmarking/BenchmarkResult.txt

Lines changed: 95 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,140 @@
1-
Repeat 800000 for size 4
1+
Repeat 400000 for size 4
22
------------------------------------
33

44
ConcurrentQueueObjectPool...............................
5-
00:00:02.1768070 Take From Empty (In Parallel)
6-
00:00:01.6760555 Give To (In Parallel)
7-
00:00:01.7056065 Mixed 90%-Take/10%-Give (In Parallel)
8-
00:00:01.6512698 Mixed 50%-Take/50%-Give (In Parallel)
9-
00:00:01.6459856 Mixed 10%-Take/90%-Give (In Parallel)
10-
00:00:00.0942697 Empty Pool (.TryTake())
11-
00:00:08.9499941 TOTAL
5+
00:00:01.8472469 Give To (In Parallel)
6+
00:00:01.7363986 Mixed 90%-Take/10%-Give (In Parallel)
7+
00:00:01.6837968 Mixed 50%-Take/50%-Give (In Parallel)
8+
00:00:01.7096510 Mixed 10%-Take/90%-Give (In Parallel)
9+
00:00:00.1076125 Empty Pool (.TryTake())
10+
00:00:07.0847058 TOTAL
1211

1312
ConcurrentStackObjectPool...............................
14-
00:00:02.0861011 Take From Empty (In Parallel)
15-
00:00:01.9051266 Give To (In Parallel)
16-
00:00:01.7180590 Mixed 90%-Take/10%-Give (In Parallel)
17-
00:00:01.6934710 Mixed 50%-Take/50%-Give (In Parallel)
18-
00:00:01.8172521 Mixed 10%-Take/90%-Give (In Parallel)
19-
00:00:00.0935848 Empty Pool (.TryTake())
20-
00:00:09.3135946 TOTAL
13+
00:00:01.8102817 Give To (In Parallel)
14+
00:00:01.7426871 Mixed 90%-Take/10%-Give (In Parallel)
15+
00:00:01.6518815 Mixed 50%-Take/50%-Give (In Parallel)
16+
00:00:01.8414613 Mixed 10%-Take/90%-Give (In Parallel)
17+
00:00:00.1049529 Empty Pool (.TryTake())
18+
00:00:07.1512645 TOTAL
2119

2220
OptimisticArrayObjectPool...............................
23-
00:00:02.1028619 Take From Empty (In Parallel)
24-
00:00:01.7289187 Give To (In Parallel)
25-
00:00:01.7391071 Mixed 90%-Take/10%-Give (In Parallel)
26-
00:00:01.7308129 Mixed 50%-Take/50%-Give (In Parallel)
27-
00:00:01.7911409 Mixed 10%-Take/90%-Give (In Parallel)
28-
00:00:00.0850814 Empty Pool (.TryTake())
29-
00:00:09.1779229 TOTAL
21+
00:00:01.8589242 Give To (In Parallel)
22+
00:00:01.7585402 Mixed 90%-Take/10%-Give (In Parallel)
23+
00:00:01.7489384 Mixed 50%-Take/50%-Give (In Parallel)
24+
00:00:01.7687298 Mixed 10%-Take/90%-Give (In Parallel)
25+
00:00:00.0952550 Empty Pool (.TryTake())
26+
00:00:07.2303876 TOTAL
3027

3128

32-
Repeat 320000 for size 10
29+
Repeat 160000 for size 10
3330
------------------------------------
3431

3532
ConcurrentQueueObjectPool...............................
36-
00:00:01.4097002 Take From Empty (In Parallel)
37-
00:00:01.0808791 Give To (In Parallel)
38-
00:00:01.0795562 Mixed 90%-Take/10%-Give (In Parallel)
39-
00:00:01.0359202 Mixed 50%-Take/50%-Give (In Parallel)
40-
00:00:01.0900044 Mixed 10%-Take/90%-Give (In Parallel)
41-
00:00:00.1022724 Empty Pool (.TryTake())
42-
00:00:05.7983325 TOTAL
33+
00:00:00.7782376 Give To (In Parallel)
34+
00:00:00.7324783 Mixed 90%-Take/10%-Give (In Parallel)
35+
00:00:00.7163121 Mixed 50%-Take/50%-Give (In Parallel)
36+
00:00:00.7306797 Mixed 10%-Take/90%-Give (In Parallel)
37+
00:00:00.0971813 Empty Pool (.TryTake())
38+
00:00:03.0548890 TOTAL
4339

4440
ConcurrentStackObjectPool...............................
45-
00:00:01.3884640 Take From Empty (In Parallel)
46-
00:00:01.2335304 Give To (In Parallel)
47-
00:00:01.0874214 Mixed 90%-Take/10%-Give (In Parallel)
48-
00:00:01.0858229 Mixed 50%-Take/50%-Give (In Parallel)
49-
00:00:01.1916481 Mixed 10%-Take/90%-Give (In Parallel)
50-
00:00:00.1097261 Empty Pool (.TryTake())
51-
00:00:06.0966129 TOTAL
41+
00:00:00.9064832 Give To (In Parallel)
42+
00:00:00.7690028 Mixed 90%-Take/10%-Give (In Parallel)
43+
00:00:00.7207622 Mixed 50%-Take/50%-Give (In Parallel)
44+
00:00:00.8417267 Mixed 10%-Take/90%-Give (In Parallel)
45+
00:00:00.1034971 Empty Pool (.TryTake())
46+
00:00:03.3414720 TOTAL
5247

5348
OptimisticArrayObjectPool...............................
54-
00:00:01.3395438 Take From Empty (In Parallel)
55-
00:00:01.0630741 Give To (In Parallel)
56-
00:00:01.0581905 Mixed 90%-Take/10%-Give (In Parallel)
57-
00:00:01.0257850 Mixed 50%-Take/50%-Give (In Parallel)
58-
00:00:01.0596437 Mixed 10%-Take/90%-Give (In Parallel)
59-
00:00:00.1231254 Empty Pool (.TryTake())
60-
00:00:05.6693625 TOTAL
49+
00:00:00.8577028 Give To (In Parallel)
50+
00:00:00.7887449 Mixed 90%-Take/10%-Give (In Parallel)
51+
00:00:00.7333412 Mixed 50%-Take/50%-Give (In Parallel)
52+
00:00:00.8531175 Mixed 10%-Take/90%-Give (In Parallel)
53+
00:00:00.1088223 Empty Pool (.TryTake())
54+
00:00:03.3417287 TOTAL
6155

6256

63-
Repeat 96000 for size 50
57+
Repeat 48000 for size 50
6458
------------------------------------
6559

6660
ConcurrentQueueObjectPool...............................
67-
00:00:00.6724161 Take From Empty (In Parallel)
68-
00:00:00.9303053 Give To (In Parallel)
69-
00:00:00.6667530 Mixed 90%-Take/10%-Give (In Parallel)
70-
00:00:00.4869434 Mixed 50%-Take/50%-Give (In Parallel)
71-
00:00:00.5629880 Mixed 10%-Take/90%-Give (In Parallel)
72-
00:00:00.1474862 Empty Pool (.TryTake())
73-
00:00:03.4668920 TOTAL
61+
00:00:00.4952668 Give To (In Parallel)
62+
00:00:00.3843341 Mixed 90%-Take/10%-Give (In Parallel)
63+
00:00:00.3179560 Mixed 50%-Take/50%-Give (In Parallel)
64+
00:00:00.3515590 Mixed 10%-Take/90%-Give (In Parallel)
65+
00:00:00.1171762 Empty Pool (.TryTake())
66+
00:00:01.6662921 TOTAL
7467

7568
ConcurrentStackObjectPool...............................
76-
00:00:00.6404036 Take From Empty (In Parallel)
77-
00:00:00.7253187 Give To (In Parallel)
78-
00:00:00.5973183 Mixed 90%-Take/10%-Give (In Parallel)
79-
00:00:00.5004547 Mixed 50%-Take/50%-Give (In Parallel)
80-
00:00:00.6653687 Mixed 10%-Take/90%-Give (In Parallel)
81-
00:00:00.1585221 Empty Pool (.TryTake())
82-
00:00:03.2873861 TOTAL
69+
00:00:00.5346734 Give To (In Parallel)
70+
00:00:00.3824365 Mixed 90%-Take/10%-Give (In Parallel)
71+
00:00:00.3211063 Mixed 50%-Take/50%-Give (In Parallel)
72+
00:00:00.4865511 Mixed 10%-Take/90%-Give (In Parallel)
73+
00:00:00.1248121 Empty Pool (.TryTake())
74+
00:00:01.8495794 TOTAL
8375

8476
OptimisticArrayObjectPool...............................
85-
00:00:00.6273288 Take From Empty (In Parallel)
86-
00:00:00.6296415 Give To (In Parallel)
87-
00:00:00.5758157 Mixed 90%-Take/10%-Give (In Parallel)
88-
00:00:00.4575284 Mixed 50%-Take/50%-Give (In Parallel)
89-
00:00:00.5484878 Mixed 10%-Take/90%-Give (In Parallel)
90-
00:00:00.3576192 Empty Pool (.TryTake())
91-
00:00:03.1964214 TOTAL
77+
00:00:00.5833078 Give To (In Parallel)
78+
00:00:00.4477068 Mixed 90%-Take/10%-Give (In Parallel)
79+
00:00:00.3296106 Mixed 50%-Take/50%-Give (In Parallel)
80+
00:00:00.4408652 Mixed 10%-Take/90%-Give (In Parallel)
81+
00:00:00.3016180 Empty Pool (.TryTake())
82+
00:00:02.1031084 TOTAL
9283

9384

94-
Repeat 64000 for size 100
85+
Repeat 32000 for size 100
9586
------------------------------------
9687

9788
ConcurrentQueueObjectPool...............................
98-
00:00:00.5739788 Take From Empty (In Parallel)
99-
00:00:00.8879708 Give To (In Parallel)
100-
00:00:00.6868932 Mixed 90%-Take/10%-Give (In Parallel)
101-
00:00:00.5038095 Mixed 50%-Take/50%-Give (In Parallel)
102-
00:00:00.6414144 Mixed 10%-Take/90%-Give (In Parallel)
103-
00:00:00.1906175 Empty Pool (.TryTake())
104-
00:00:03.4846842 TOTAL
89+
00:00:00.4969536 Give To (In Parallel)
90+
00:00:00.4326518 Mixed 90%-Take/10%-Give (In Parallel)
91+
00:00:00.3199614 Mixed 50%-Take/50%-Give (In Parallel)
92+
00:00:00.4396957 Mixed 10%-Take/90%-Give (In Parallel)
93+
00:00:00.1608001 Empty Pool (.TryTake())
94+
00:00:01.8500626 TOTAL
10595

10696
ConcurrentStackObjectPool...............................
107-
00:00:00.5710317 Take From Empty (In Parallel)
108-
00:00:00.8181417 Give To (In Parallel)
109-
00:00:02.3020598 Mixed 90%-Take/10%-Give (In Parallel)
110-
00:00:00.5377935 Mixed 50%-Take/50%-Give (In Parallel)
111-
00:00:00.7552635 Mixed 10%-Take/90%-Give (In Parallel)
112-
00:00:00.2106115 Empty Pool (.TryTake())
113-
00:00:05.1949017 TOTAL
97+
00:00:00.5521412 Give To (In Parallel)
98+
00:00:00.4853524 Mixed 90%-Take/10%-Give (In Parallel)
99+
00:00:00.3175640 Mixed 50%-Take/50%-Give (In Parallel)
100+
00:00:00.5159456 Mixed 10%-Take/90%-Give (In Parallel)
101+
00:00:00.1572408 Empty Pool (.TryTake())
102+
00:00:02.0282440 TOTAL
114103

115104
OptimisticArrayObjectPool...............................
116-
00:00:00.5741654 Take From Empty (In Parallel)
117-
00:00:00.6708564 Give To (In Parallel)
118-
00:00:00.6465793 Mixed 90%-Take/10%-Give (In Parallel)
119-
00:00:00.4123009 Mixed 50%-Take/50%-Give (In Parallel)
120-
00:00:00.5587647 Mixed 10%-Take/90%-Give (In Parallel)
121-
00:00:00.5961525 Empty Pool (.TryTake())
122-
00:00:03.4588192 TOTAL
105+
00:00:00.7719640 Give To (In Parallel)
106+
00:00:00.5488668 Mixed 90%-Take/10%-Give (In Parallel)
107+
00:00:00.2717297 Mixed 50%-Take/50%-Give (In Parallel)
108+
00:00:00.5357692 Mixed 10%-Take/90%-Give (In Parallel)
109+
00:00:00.6489823 Empty Pool (.TryTake())
110+
00:00:02.7773120 TOTAL
123111

124112

125-
Repeat 51200 for size 250
113+
Repeat 25600 for size 250
126114
------------------------------------
127115

128116
ConcurrentQueueObjectPool...............................
129-
00:00:00.7338318 Take From Empty (In Parallel)
130-
00:00:02.7582430 Give To (In Parallel)
131-
00:00:01.3118591 Mixed 90%-Take/10%-Give (In Parallel)
132-
00:00:00.8866236 Mixed 50%-Take/50%-Give (In Parallel)
133-
00:00:01.2641219 Mixed 10%-Take/90%-Give (In Parallel)
134-
00:00:00.3621620 Empty Pool (.TryTake())
135-
00:00:07.3168414 TOTAL
117+
00:00:00.7980353 Give To (In Parallel)
118+
00:00:00.6178042 Mixed 90%-Take/10%-Give (In Parallel)
119+
00:00:00.5431682 Mixed 50%-Take/50%-Give (In Parallel)
120+
00:00:00.6892625 Mixed 10%-Take/90%-Give (In Parallel)
121+
00:00:00.2954847 Empty Pool (.TryTake())
122+
00:00:02.9437549 TOTAL
136123

137124
ConcurrentStackObjectPool...............................
138-
00:00:00.7063932 Take From Empty (In Parallel)
139-
00:00:01.4843162 Give To (In Parallel)
140-
00:00:04.0788532 Mixed 90%-Take/10%-Give (In Parallel)
141-
00:00:01.6259396 Mixed 50%-Take/50%-Give (In Parallel)
142-
00:00:01.3564185 Mixed 10%-Take/90%-Give (In Parallel)
143-
00:00:00.4047656 Empty Pool (.TryTake())
144-
00:00:09.6566863 TOTAL
125+
00:00:00.9389921 Give To (In Parallel)
126+
00:00:00.9667758 Mixed 90%-Take/10%-Give (In Parallel)
127+
00:00:00.5609015 Mixed 50%-Take/50%-Give (In Parallel)
128+
00:00:00.8204988 Mixed 10%-Take/90%-Give (In Parallel)
129+
00:00:00.3075525 Empty Pool (.TryTake())
130+
00:00:03.5947207 TOTAL
145131

146132
OptimisticArrayObjectPool...............................
147-
00:00:00.7798597 Take From Empty (In Parallel)
148-
00:00:01.3369029 Give To (In Parallel)
149-
00:00:01.3656621 Mixed 90%-Take/10%-Give (In Parallel)
150-
00:00:00.6762451 Mixed 50%-Take/50%-Give (In Parallel)
151-
00:00:01.0179464 Mixed 10%-Take/90%-Give (In Parallel)
152-
00:00:01.8689033 Empty Pool (.TryTake())
153-
00:00:07.0455195 TOTAL
154-
155-
156-
Repeat 12800 for size 2000
157-
------------------------------------
158-
159-
ConcurrentQueueObjectPool...............................
160-
00:00:00.7690881 Take From Empty (In Parallel)
161-
00:00:02.9469849 Give To (In Parallel)
162-
00:00:02.0202982 Mixed 90%-Take/10%-Give (In Parallel)
163-
00:00:01.3725082 Mixed 50%-Take/50%-Give (In Parallel)
164-
00:00:02.1013278 Mixed 10%-Take/90%-Give (In Parallel)
165-
00:00:00.6418618 Empty Pool (.TryTake())
166-
00:00:09.8520690 TOTAL
167-
168-
ConcurrentStackObjectPool...............................
169-
00:00:00.6845217 Take From Empty (In Parallel)
170-
00:00:02.5773779 Give To (In Parallel)
171-
00:00:04.7847969 Mixed 90%-Take/10%-Give (In Parallel)
172-
00:00:04.7546912 Mixed 50%-Take/50%-Give (In Parallel)
173-
00:00:03.4618654 Mixed 10%-Take/90%-Give (In Parallel)
174-
00:00:00.6506477 Empty Pool (.TryTake())
175-
00:00:16.9139008 TOTAL
176-
177-
OptimisticArrayObjectPool...............................
178-
00:00:00.7170882 Take From Empty (In Parallel)
179-
00:00:07.3855602 Give To (In Parallel)
180-
00:00:07.4918848 Mixed 90%-Take/10%-Give (In Parallel)
181-
00:00:01.1312204 Mixed 50%-Take/50%-Give (In Parallel)
182-
00:00:04.8420972 Mixed 10%-Take/90%-Give (In Parallel)
183-
00:00:13.1760797 Empty Pool (.TryTake())
184-
00:00:34.7439305 TOTAL
133+
00:00:02.1193418 Give To (In Parallel)
134+
00:00:01.3828499 Mixed 90%-Take/10%-Give (In Parallel)
135+
00:00:00.4523577 Mixed 50%-Take/50%-Give (In Parallel)
136+
00:00:01.3159924 Mixed 10%-Take/90%-Give (In Parallel)
137+
00:00:02.9909843 Empty Pool (.TryTake())
138+
00:00:08.2615261 TOTAL
185139

186140

0 commit comments

Comments
 (0)