BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Unknown processor
.NET Core SDK=5.0.300-preview.21180.15
[Host] : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT
Job-SOGKAI : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT
EvaluateOverhead=True Server=True Toolchain=.NET Core 3.1
Namespace=dotNetTips.Utility.Benchmarks.Extensions Categories=StringExtensions
Method |
Mean |
Error |
StdDev |
StdErr |
Min |
Q1 |
Median |
Q3 |
Max |
Op/s |
CI99.9% Margin |
Iterations |
Kurtosis |
MValue |
Skewness |
Rank |
LogicalGroup |
Baseline |
Code Size |
Gen 0 |
Gen 1 |
Gen 2 |
Allocated |
ComputeSHA256Hash |
11,237.189 ns |
94.7237 ns |
83.9701 ns |
22.4420 ns |
11,146.425 ns |
11,171.725 ns |
11,199.195 ns |
11,287.199 ns |
11,387.975 ns |
88,990.2 |
94.7237 ns |
14.00 |
1.704 |
2.000 |
0.5453 |
24 |
***** |
No |
421 B |
0.9155 |
- |
- |
8704 B |
Concat |
622.772 ns |
3.7907 ns |
3.3603 ns |
0.8981 ns |
617.275 ns |
620.833 ns |
622.628 ns |
624.947 ns |
630.159 ns |
1,605,725.0 |
3.7907 ns |
14.00 |
2.517 |
2.000 |
0.3841 |
20 |
***** |
No |
413 B |
0.6428 |
0.0057 |
- |
6064 B |
ContainsAny |
70.540 ns |
0.3400 ns |
0.3014 ns |
0.0806 ns |
69.710 ns |
70.447 ns |
70.572 ns |
70.699 ns |
70.915 ns |
14,176,311.9 |
0.3400 ns |
14.00 |
4.496 |
2.000 |
-1.2685 |
8 |
***** |
No |
272 B |
0.0169 |
- |
- |
160 B |
DefaultIfNull |
1.913 ns |
0.0200 ns |
0.0178 ns |
0.0047 ns |
1.893 ns |
1.904 ns |
1.906 ns |
1.919 ns |
1.950 ns |
522,661,340.5 |
0.0200 ns |
14.00 |
2.374 |
2.000 |
0.8712 |
2 |
***** |
No |
48 B |
- |
- |
- |
- |
DefaultIfNullOrEmpty |
1.575 ns |
0.0093 ns |
0.0087 ns |
0.0022 ns |
1.563 ns |
1.570 ns |
1.572 ns |
1.580 ns |
1.592 ns |
634,952,959.1 |
0.0093 ns |
15.00 |
2.136 |
2.000 |
0.6292 |
1 |
***** |
No |
56 B |
- |
- |
- |
- |
DelimitedStringToArray |
299.917 ns |
2.7728 ns |
2.5937 ns |
0.6697 ns |
294.885 ns |
298.102 ns |
299.533 ns |
301.810 ns |
304.606 ns |
3,334,250.7 |
2.7728 ns |
15.00 |
2.097 |
2.000 |
0.0116 |
15 |
***** |
No |
118 B |
0.0558 |
- |
- |
528 B |
EqualsIgnoreCase |
462.258 ns |
2.6056 ns |
2.3098 ns |
0.6173 ns |
455.930 ns |
462.436 ns |
462.780 ns |
463.637 ns |
463.847 ns |
2,163,296.2 |
2.6056 ns |
14.00 |
4.772 |
2.000 |
-1.7545 |
17 |
***** |
No |
677 B |
0.0281 |
- |
- |
264 B |
EqualsOrBothNullOrEmpty |
463.729 ns |
3.1723 ns |
2.9674 ns |
0.7662 ns |
456.591 ns |
462.553 ns |
464.731 ns |
465.841 ns |
466.843 ns |
2,156,432.9 |
3.1723 ns |
15.00 |
2.923 |
2.000 |
-0.9702 |
17 |
***** |
No |
249 B |
0.0277 |
- |
- |
264 B |
FromBase64:ToBase64 |
3,099.288 ns |
25.4427 ns |
23.7991 ns |
6.1449 ns |
3,071.564 ns |
3,080.277 ns |
3,093.182 ns |
3,120.389 ns |
3,146.940 ns |
322,654.8 |
25.4427 ns |
15.00 |
1.824 |
2.000 |
0.5806 |
22 |
***** |
No |
446 B |
0.1450 |
- |
- |
1368 B |
HasValue |
7.877 ns |
0.1517 ns |
0.1490 ns |
0.0372 ns |
7.708 ns |
7.807 ns |
7.853 ns |
7.878 ns |
8.210 ns |
126,952,855.6 |
0.1517 ns |
16.00 |
2.746 |
2.000 |
0.9492 |
3 |
***** |
No |
341 B |
- |
- |
- |
- |
Indent |
474.546 ns |
1.5307 ns |
1.2782 ns |
0.3545 ns |
472.868 ns |
473.514 ns |
474.720 ns |
474.979 ns |
477.366 ns |
2,107,277.6 |
1.5307 ns |
13.00 |
2.471 |
2.000 |
0.5230 |
18 |
***** |
No |
288 B |
0.4334 |
0.0024 |
- |
4088 B |
IsAsciiLetter |
22.830 ns |
0.1491 ns |
0.1245 ns |
0.0345 ns |
22.545 ns |
22.788 ns |
22.812 ns |
22.868 ns |
23.079 ns |
43,801,984.0 |
0.1491 ns |
13.00 |
3.481 |
2.000 |
-0.2003 |
5 |
***** |
No |
226 B |
- |
- |
- |
- |
IsAsciiLetterOrDigit |
24.786 ns |
0.1301 ns |
0.1153 ns |
0.0308 ns |
24.589 ns |
24.724 ns |
24.792 ns |
24.835 ns |
25.043 ns |
40,345,686.2 |
0.1301 ns |
14.00 |
2.835 |
2.000 |
0.2690 |
7 |
***** |
No |
249 B |
- |
- |
- |
- |
IsWhitespace:Char |
23.565 ns |
0.1615 ns |
0.1432 ns |
0.0383 ns |
23.306 ns |
23.507 ns |
23.568 ns |
23.627 ns |
23.853 ns |
42,435,683.4 |
0.1615 ns |
14.00 |
2.441 |
2.000 |
0.0880 |
6 |
***** |
No |
256 B |
- |
- |
- |
- |
IsWhitespace:String |
21.873 ns |
0.3943 ns |
0.5654 ns |
0.1069 ns |
20.987 ns |
21.479 ns |
21.951 ns |
21.991 ns |
23.459 ns |
45,717,611.1 |
0.3943 ns |
28.00 |
3.323 |
2.000 |
0.5367 |
4 |
***** |
No |
117 B |
- |
- |
- |
- |
'Split:Char Separator' |
247.009 ns |
0.6833 ns |
0.6392 ns |
0.1650 ns |
246.138 ns |
246.597 ns |
246.823 ns |
247.417 ns |
248.236 ns |
4,048,429.4 |
0.6833 ns |
15.00 |
1.913 |
2.000 |
0.4957 |
13 |
***** |
No |
955 B |
0.0505 |
- |
- |
480 B |
'Split:Char Separator-Count' |
167.178 ns |
0.5763 ns |
0.4813 ns |
0.1335 ns |
166.416 ns |
166.829 ns |
167.193 ns |
167.397 ns |
168.345 ns |
5,981,656.7 |
0.5763 ns |
13.00 |
3.297 |
2.000 |
0.7175 |
11 |
***** |
No |
955 B |
0.0265 |
- |
- |
248 B |
'Split:Char Separator-Count-RemoveEmptyEntries' |
126.955 ns |
1.7548 ns |
1.6415 ns |
0.4238 ns |
124.792 ns |
125.078 ns |
127.855 ns |
128.072 ns |
128.969 ns |
7,876,790.4 |
1.7548 ns |
15.00 |
1.200 |
2.000 |
-0.3212 |
9 |
***** |
No |
958 B |
0.0265 |
- |
- |
248 B |
'Split:Char Separator-RemoveEmptyEntries' |
253.358 ns |
1.7527 ns |
1.6394 ns |
0.4233 ns |
250.018 ns |
251.959 ns |
254.223 ns |
254.414 ns |
255.439 ns |
3,946,977.8 |
1.7527 ns |
15.00 |
1.853 |
2.000 |
-0.5730 |
14 |
***** |
No |
958 B |
0.0491 |
- |
- |
464 B |
'Split:String Separator' |
302.367 ns |
2.5243 ns |
2.3612 ns |
0.6097 ns |
297.327 ns |
300.946 ns |
302.795 ns |
303.615 ns |
307.555 ns |
3,307,236.0 |
2.5243 ns |
15.00 |
3.155 |
2.000 |
-0.0597 |
15 |
***** |
No |
1124 B |
0.0520 |
- |
- |
488 B |
'Split:String Separator-Count' |
164.215 ns |
0.8437 ns |
0.7479 ns |
0.1999 ns |
163.027 ns |
163.778 ns |
163.997 ns |
164.645 ns |
165.891 ns |
6,089,584.0 |
0.8437 ns |
14.00 |
2.620 |
2.000 |
0.7059 |
10 |
***** |
No |
1124 B |
0.0262 |
- |
- |
248 B |
'Split:String Separator-Count-RemoveEmptyEntries' |
173.506 ns |
0.9013 ns |
0.7990 ns |
0.2135 ns |
171.375 ns |
173.477 ns |
173.644 ns |
173.893 ns |
174.621 ns |
5,763,500.6 |
0.9013 ns |
14.00 |
4.101 |
2.000 |
-1.2006 |
12 |
***** |
No |
1124 B |
0.0262 |
- |
- |
248 B |
'Split:String Separator-RemoveEmptyEntries' |
363.809 ns |
2.1444 ns |
2.0059 ns |
0.5179 ns |
359.492 ns |
363.117 ns |
364.810 ns |
365.182 ns |
365.497 ns |
2,748,691.5 |
2.1444 ns |
15.00 |
2.784 |
2.000 |
-1.1297 |
16 |
***** |
No |
1124 B |
0.0515 |
- |
- |
488 B |
StartsWithOrdinal |
466.439 ns |
1.4864 ns |
1.2413 ns |
0.3443 ns |
463.162 ns |
466.002 ns |
466.512 ns |
466.986 ns |
468.183 ns |
2,143,903.7 |
1.4864 ns |
13.00 |
4.193 |
2.000 |
-1.0899 |
17 |
***** |
No |
270 B |
0.0281 |
- |
- |
264 B |
StartsWithOrdinalIgnoreCase |
490.512 ns |
5.8431 ns |
5.1797 ns |
1.3843 ns |
481.051 ns |
486.343 ns |
490.968 ns |
493.164 ns |
500.934 ns |
2,038,686.5 |
5.8431 ns |
14.00 |
2.325 |
2.000 |
0.0926 |
19 |
***** |
No |
270 B |
0.0277 |
- |
- |
264 B |
SubstringTrim |
2,593.955 ns |
24.4278 ns |
22.8498 ns |
5.8998 ns |
2,555.948 ns |
2,574.580 ns |
2,601.641 ns |
2,606.407 ns |
2,627.958 ns |
385,511.8 |
24.4278 ns |
15.00 |
1.764 |
2.000 |
-0.4323 |
21 |
***** |
No |
727 B |
0.0572 |
- |
- |
568 B |
ToTitleCase |
10,077.153 ns |
78.0798 ns |
69.2157 ns |
18.4987 ns |
9,932.143 ns |
10,065.007 ns |
10,100.717 ns |
10,121.160 ns |
10,163.107 ns |
99,234.4 |
78.0798 ns |
14.00 |
2.391 |
2.000 |
-0.9017 |
23 |
***** |
No |
774 B |
0.4883 |
- |
- |
4552 B |
ToTrimmed |
457.785 ns |
2.5972 ns |
2.4294 ns |
0.6273 ns |
454.224 ns |
456.259 ns |
457.553 ns |
459.285 ns |
463.671 ns |
2,184,433.9 |
2.5972 ns |
15.00 |
3.002 |
2.000 |
0.5745 |
17 |
***** |
No |
138 B |
0.4196 |
0.0019 |
- |
3944 B |