MihuBot / runtime-utils

0 stars 0 forks source link

[Benchmark X64] [MihaZupan] Add SearchValues<char> implementation for two sets of 128 chars #505

Open MihuBot opened 4 months ago

MihuBot commented 4 months ago

Job completed in 1 hour 5 minutes.

Using arguments: benchmark RustLang_Sherlock https://github.com/MihaZupan/performance/tree/compiled-regex-only -Intel -medium -NoPRLink

System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock ``` BenchmarkDotNet v0.13.13-nightly.20240311.145, Ubuntu 22.04.4 LTS (Jammy Jellyfish) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 8 logical and 4 physical cores MediumRun : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI Job=MediumRun OutlierMode=DontRemove IterationCount=15 LaunchCount=2 MemoryRandomization=True WarmupCount=10 ``` | Method | Toolchain | Pattern | Mean | Error | Ratio | Allocated | Alloc Ratio | |------- |------------------------ |------------------------------------- |-----------------:|---------------:|------:|----------:|------------:| | **Count** | **Main** | **.*** | **697,453.02 ns** | **2,017.072 ns** | **1.00** | **2 B** | **1.00** | | Count | PR | .* | 700,446.11 ns | 2,627.367 ns | 1.00 | 2 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **(?i)Holmes** | **71,939.83 ns** | **290.983 ns** | **1.00** | **-** | **NA** | | Count | PR | (?i)Holmes | 72,848.97 ns | 302.143 ns | 1.01 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?i)Sher[a-z]+\|Hol[a-z]+** | **94,383.49 ns** | **4,905.161 ns** | **1.01** | **-** | **NA** | | Count | PR | (?i)Sher[a-z]+\|Hol[a-z]+ | 95,925.74 ns | 4,454.239 ns | 1.02 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?i)Sherlock** | **63,481.98 ns** | **335.290 ns** | **1.00** | **-** | **NA** | | Count | PR | (?i)Sherlock | 63,606.02 ns | 339.137 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?i)Sherlock Holmes** | **63,012.25 ns** | **263.773 ns** | **1.00** | **-** | **NA** | | Count | PR | (?i)Sherlock Holmes | 63,075.32 ns | 291.074 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?i)Sherlock\|Holmes\|Watson** | **95,478.93 ns** | **4,941.544 ns** | **1.01** | **-** | **NA** | | Count | PR | (?i)Sherlock\|Holmes\|Watson | 96,498.84 ns | 4,126.007 ns | 1.02 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?i)Sherlock\|(...)er\|John\|Baker [49]** | **284,601.48 ns** | **5,267.221 ns** | **1.00** | **2 B** | **1.00** | | Count | PR | (?i)Sherlock\|(...)er\|John\|Baker [49] | 280,005.14 ns | 5,911.696 ns | 0.98 | 2 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **(?i)the** | **381,635.97 ns** | **4,650.495 ns** | **1.00** | **1 B** | **1.00** | | Count | PR | (?i)the | 387,014.20 ns | 6,725.885 ns | 1.01 | 1 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **(?m)^Sherlock(...)rlock Holmes$ [37]** | **80,731.48 ns** | **4,259.412 ns** | **1.01** | **-** | **NA** | | Count | PR | (?m)^Sherlock(...)rlock Holmes$ [37] | 86,077.51 ns | 232.643 ns | 1.07 | - | NA | | | | | | | | | | | **Count** | **Main** | **(?s).*** | **51.67 ns** | **0.270 ns** | **1.00** | **-** | **NA** | | Count | PR | (?s).* | 54.43 ns | 0.965 ns | 1.05 | - | NA | | | | | | | | | | | **Count** | **Main** | **[^\\n]*** | **710,735.98 ns** | **8,300.386 ns** | **1.00** | **2 B** | **1.00** | | Count | PR | [^\\n]* | 700,219.34 ns | 1,276.287 ns | 0.99 | 2 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **[a-q][^u-z]{13}x** | **33,794.90 ns** | **783.510 ns** | **1.00** | **-** | **NA** | | Count | PR | [a-q][^u-z]{13}x | 32,806.62 ns | 589.808 ns | 0.97 | - | NA | | | | | | | | | | | **Count** | **Main** | **[a-zA-Z]+ing** | **4,662,138.35 ns** | **18,067.424 ns** | **1.00** | **21 B** | **1.00** | | Count | PR | [a-zA-Z]+ing | 4,660,104.13 ns | 9,053.363 ns | 1.00 | 21 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\b\\w+n\\b** | **9,906,973.18 ns** | **7,287.706 ns** | **1.00** | **44 B** | **1.00** | | Count | PR | \\b\\w+n\\b | 9,937,875.81 ns | 23,917.195 ns | 1.00 | 44 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\p{L}** | **10,515,259.34 ns** | **60,791.446 ns** | **1.00** | **35 B** | **1.00** | | Count | PR | \\p{L} | 10,881,185.28 ns | 434,204.545 ns | 1.03 | 35 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\p{Ll}** | **10,183,022.90 ns** | **17,463.927 ns** | **1.00** | **35 B** | **1.00** | | Count | PR | \\p{Ll} | 10,224,204.82 ns | 96,449.077 ns | 1.00 | 35 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\p{Lu}** | **511,387.28 ns** | **2,316.745 ns** | **1.00** | **2 B** | **1.00** | | Count | PR | \\p{Lu} | 510,077.24 ns | 923.926 ns | 1.00 | 2 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\s[a-zA-Z]{0,12}ing\\s** | **5,462,882.59 ns** | **45,284.053 ns** | **1.00** | **24 B** | **1.00** | | Count | PR | \\s[a-zA-Z]{0,12}ing\\s | 5,549,846.24 ns | 93,073.605 ns | 1.02 | 24 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\w+** | **5,240,444.60 ns** | **89,397.054 ns** | **1.00** | **21 B** | **1.00** | | Count | PR | \\w+ | 5,153,206.34 ns | 8,298.437 ns | 0.98 | 18 B | 0.86 | | | | | | | | | | | **Count** | **Main** | **\\w+\\s+Holmes** | **3,979,950.36 ns** | **8,831.250 ns** | **1.00** | **22 B** | **1.00** | | Count | PR | \\w+\\s+Holmes | 3,982,138.11 ns | 18,625.832 ns | 1.00 | 22 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **\\w+\\s+Holmes\\s+\\w+** | **4,265,953.22 ns** | **112,900.665 ns** | **1.00** | **20 B** | **1.00** | | Count | PR | \\w+\\s+Holmes\\s+\\w+ | 4,196,284.92 ns | 51,324.881 ns | 0.99 | 23 B | 1.15 | | | | | | | | | | | **Count** | **Main** | **aei** | **59,728.26 ns** | **259.361 ns** | **1.00** | **-** | **NA** | | Count | PR | aei | 59,657.02 ns | 448.506 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **aqj** | **59,407.35 ns** | **613.372 ns** | **1.00** | **-** | **NA** | | Count | PR | aqj | 59,831.79 ns | 197.044 ns | 1.01 | - | NA | | | | | | | | | | | **Count** | **Main** | **Holmes** | **69,372.43 ns** | **516.355 ns** | **1.00** | **-** | **NA** | | Count | PR | Holmes | 69,633.32 ns | 353.748 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **Holmes.{0,25}(...).{0,25}Holmes [39]** | **60,430.51 ns** | **911.522 ns** | **1.00** | **-** | **NA** | | Count | PR | Holmes.{0,25}(...).{0,25}Holmes [39] | 58,280.74 ns | 1,356.224 ns | 0.96 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sher[a-z]+\|Hol[a-z]+** | **64,224.18 ns** | **928.421 ns** | **1.00** | **-** | **NA** | | Count | PR | Sher[a-z]+\|Hol[a-z]+ | 65,911.73 ns | 981.792 ns | 1.03 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock** | **86,609.44 ns** | **312.379 ns** | **1.00** | **-** | **NA** | | Count | PR | Sherlock | 85,657.48 ns | 2,084.925 ns | 0.99 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock Holmes** | **82,811.04 ns** | **3,714.982 ns** | **1.00** | **-** | **NA** | | Count | PR | Sherlock Holmes | 83,954.94 ns | 3,325.155 ns | 1.02 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock\\s+Holmes** | **80,906.24 ns** | **4,130.958 ns** | **1.01** | **-** | **NA** | | Count | PR | Sherlock\\s+Holmes | 81,368.17 ns | 4,219.491 ns | 1.01 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock\|Holmes** | **59,050.02 ns** | **766.973 ns** | **1.00** | **-** | **NA** | | Count | PR | Sherlock\|Holmes | 59,314.89 ns | 776.583 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock\|Holmes\|Watson** | **77,772.15 ns** | **1,500.983 ns** | **1.00** | **-** | **NA** | | Count | PR | Sherlock\|Holmes\|Watson | 77,281.50 ns | 772.399 ns | 0.99 | - | NA | | | | | | | | | | | **Count** | **Main** | **Sherlock\|Holm(...)er\|John\|Baker [45]** | **209,618.63 ns** | **898.107 ns** | **1.00** | **1 B** | **1.00** | | Count | PR | Sherlock\|Holm(...)er\|John\|Baker [45] | 194,477.99 ns | 1,466.488 ns | 0.93 | 1 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **Sherlock\|Street** | **35,358.67 ns** | **547.635 ns** | **1.00** | **-** | **NA** | | Count | PR | Sherlock\|Street | 35,089.04 ns | 1,160.375 ns | 0.99 | - | NA | | | | | | | | | | | **Count** | **Main** | **the** | **313,767.69 ns** | **5,489.290 ns** | **1.00** | **1 B** | **1.00** | | Count | PR | the | 305,054.90 ns | 609.305 ns | 0.97 | 1 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **The** | **74,414.99 ns** | **440.352 ns** | **1.00** | **-** | **NA** | | Count | PR | The | 74,482.49 ns | 513.920 ns | 1.00 | - | NA | | | | | | | | | | | **Count** | **Main** | **the\\s+\\w+** | **445,991.28 ns** | **465.301 ns** | **1.00** | **1 B** | **1.00** | | Count | PR | the\\s+\\w+ | 446,266.35 ns | 919.322 ns | 1.00 | 1 B | 1.00 | | | | | | | | | | | **Count** | **Main** | **zqj** | **59,529.49 ns** | **408.659 ns** | **1.00** | **2 B** | **1.00** | | Count | PR | zqj | 59,995.50 ns | 578.427 ns | 1.01 | 2 B | 1.00 |

Artifacts:

MihuBot commented 4 months ago

@MihaZupan