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

[Perf -1,796%] System.Globalization.Tests.StringSearch (33) #37819

Closed
DrewScoggins opened this issue Jun 12, 2020 · 12 comments
Closed

[Perf -1,796%] System.Globalization.Tests.StringSearch (33) #37819

DrewScoggins opened this issue Jun 12, 2020 · 12 comments
Labels
arch-x64 area-System.Globalization os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue
Milestone

Comments

@DrewScoggins
Copy link
Member

Run Information

Architecture x64
OS Windows 10.0.18362
Changes diff

Regressions in System.Globalization.Tests.StringSearch

Benchmark Baseline Test Test/Base Modality Baseline Outlier
IsPrefix_FirstHalf 1.03 μs 4.07 μs 3.95 False
IsPrefix_DifferentFirstChar 108.31 ns 943.68 ns 8.71 False
IndexOf_Word_NotFound 10.67 μs 16.73 μs 1.57 False
IsPrefix_FirstHalf 2.88 μs 6.44 μs 2.24 False
IsPrefix_FirstHalf 1.06 μs 4.07 μs 3.84 False
IndexOf_Word_NotFound 3.77 μs 13.06 μs 3.47 False
IsSuffix_SecondHalf 2.77 μs 7.91 μs 2.85 False
IndexOf_Word_NotFound 4.48 μs 12.74 μs 2.84 False
IsSuffix_SecondHalf 2.71 μs 7.89 μs 2.91 False
IndexOf_Word_NotFound 4.43 μs 13.30 μs 3.00 False
LastIndexOf_Word_NotFound 722.67 ns 3.07 μs 4.25 False
IsPrefix_DifferentFirstChar 74.49 ns 33.91 μs 455.17 False
LastIndexOf_Word_NotFound 3.45 μs 18.97 μs 5.49 False
IsPrefix_FirstHalf 1.04 μs 19.76 μs 18.92 False
LastIndexOf_Word_NotFound 3.48 μs 19.26 μs 5.53 False
IndexOf_Word_NotFound 4.41 μs 13.13 μs 2.97 False
IsPrefix_DifferentFirstChar 7.42 ns 12.15 ns 1.64 False
IsPrefix_DifferentFirstChar 79.69 ns 947.48 ns 11.89 False
IsPrefix_DifferentFirstChar 79.79 ns 948.99 ns 11.89 False
IsPrefix_FirstHalf 1.04 μs 4.02 μs 3.88 False
IsPrefix_DifferentFirstChar 110.79 ns 954.87 ns 8.62 False
LastIndexOf_Word_NotFound 3.48 μs 19.51 μs 5.61 False
IsPrefix_DifferentFirstChar 80.42 ns 958.20 ns 11.91 False
LastIndexOf_Word_NotFound 3.78 μs 18.52 μs 4.91 False
IsSuffix_SecondHalf 3.51 μs 22.03 μs 6.27 False
IsSuffix_SecondHalf 2.72 μs 7.91 μs 2.90 False
IndexOf_Word_NotFound 777.31 ns 3.10 μs 3.98 False
IsPrefix_FirstHalf 1.02 μs 4.07 μs 3.97 False
LastIndexOf_Word_NotFound 3.49 μs 19.50 μs 5.60 False
LastIndexOf_Word_NotFound 10.07 μs 20.54 μs 2.04 False
IsSuffix_DifferentLastChar 5.63 μs 39.52 μs 7.02 False
IsSuffix_SecondHalf 2.73 μs 7.87 μs 2.89 False
IndexOf_Word_NotFound 4.46 μs 13.17 μs 2.95 False

graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Globalization.Tests.StringSearch*';

Histogram

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, None, True))

[ 532.994 ; 1506.890) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1506.890 ; 2450.272) | 
[2450.272 ; 3630.447) | 
[3630.447 ; 4673.898) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (en-US, None, True))

[-57.647 ;  229.992) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[229.992 ;  499.302) | 
[499.302 ;  836.791) | 
[836.791 ; 1134.778) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (pl-PL, None, False))

[ 9953.392 ; 11828.365) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[11828.365 ; 13703.337) | 
[13703.337 ; 16027.879) | 
[16027.879 ; 17902.851) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (pl-PL, None, False))

[2703.046 ; 3792.142) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3792.142 ; 4881.238) | 
[4881.238 ; 5924.287) | 
[5924.287 ; 7146.272) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (, IgnoreCase, True))

[ 525.539 ; 1514.034) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1514.034 ; 2474.524) | 
[2474.524 ; 3435.015) | 
[3435.015 ; 3926.624) | 
[3926.624 ; 4887.115) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, IgnoreSymbols, False))

[ 2259.064 ;  5241.932) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5241.932 ;  8148.459) | 
[ 8148.459 ; 11969.034) | 
[11969.034 ; 15330.536) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, IgnoreCase, True))

[1914.833 ; 3559.149) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3559.149 ; 5151.682) | 
[5151.682 ; 7122.102) | 
[7122.102 ; 8784.868) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (, None, True))

[ 3087.120 ;  5824.857) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5824.857 ;  8441.180) | 
[ 8441.180 ; 11057.502) | 
[11057.502 ; 12060.923) | 
[12060.923 ; 14677.246) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (, IgnoreCase, True))

[1905.658 ; 3557.110) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3557.110 ; 5167.617) | 
[5167.617 ; 6778.125) | 
[6778.125 ; 7391.907) | 
[7391.907 ; 9002.415) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, None, True))

[ 3054.817 ;  5834.360) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5834.360 ;  8524.330) | 
[ 8524.330 ; 11890.856) | 
[11890.856 ; 14954.605) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (en-US, OrdinalIgnoreCase, False))

[ 350.301 ; 1095.495) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1095.495 ; 1837.360) | 
[1837.360 ; 2802.276) | 
[2802.276 ; 3675.831) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (en-US, IgnoreSymbols, False))

[-5196.602 ;  5352.648) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5352.648 ; 15892.823) | 
[15892.823 ; 29067.736) | 
[29067.736 ; 40313.138) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (, None, True))

[ 1046.538 ;  5927.685) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5927.685 ; 10729.973) | 
[10729.973 ; 16829.170) | 
[16829.170 ; 22116.673) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, IgnoreSymbols, False))

[-1906.639 ;  3948.383) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 3948.383 ;  9758.511) | 
[ 9758.511 ; 17044.977) | 
[17044.977 ; 23293.181) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (en-US, None, True))

[ 1008.768 ;  5968.123) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5968.123 ; 10842.435) | 
[10842.435 ; 17145.390) | 
[17145.390 ; 22474.383) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, IgnoreCase, True))

[ 3027.153 ;  5841.644) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5841.644 ;  8579.493) | 
[ 8579.493 ; 12168.340) | 
[12168.340 ; 15328.514) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (en-US, Ordinal, False))

[ 5.847 ;  6.880) | @@@@@@@@@@@
[ 6.880 ;  7.999) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 7.999 ;  8.325) | @
[ 8.325 ;  9.386) | @@@@@
[ 9.386 ; 10.364) | @@@@@@@@@@@
[10.364 ; 11.180) | @@
[11.180 ; 11.659) | 
[11.659 ; 12.637) | @

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (, None, True))

[ -62.903 ;  228.875) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 228.875 ;  509.582) | 
[ 509.582 ;  814.970) | 
[ 814.970 ; 1095.676) | @@@@@@@@@@@@@@@@
[1095.676 ; 1298.573) | 
[1298.573 ; 1579.280) | @

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (en-US, IgnoreCase, True))

[-56.551 ;  216.686) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[216.686 ;  485.750) | 
[485.750 ;  814.196) | 
[814.196 ; 1103.723) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, IgnoreCase, True))

[ 535.674 ; 1502.918) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1502.918 ; 2444.235) | 
[2444.235 ; 3542.375) | 
[3542.375 ; 4483.693) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (pl-PL, None, False))

[-19.275 ;  242.262) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[242.262 ;  499.677) | 
[499.677 ;  818.526) | 
[818.526 ; 1098.653) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (, IgnoreCase, True))

[  945.637 ;  6038.158) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6038.158 ; 11035.873) | 
[11035.873 ; 17371.911) | 
[17371.911 ; 22942.045) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (, IgnoreCase, True))

[ -67.521 ;  225.544) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 225.544 ;  513.681) | 
[ 513.681 ;  823.953) | 
[ 823.953 ; 1112.089) | @@@@@@@@@@@@@@@@
[1112.089 ; 1439.797) | 
[1439.797 ; 1727.933) | @

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (en-US, IgnoreSymbols, False))

[ 1434.261 ;  6120.375) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6120.375 ; 10716.414) | 
[10716.414 ; 16639.187) | 
[16639.187 ; 21780.182) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, IgnoreSymbols, False))

[  626.284 ;  6475.305) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6475.305 ; 12241.662) | 
[12241.662 ; 19598.627) | 
[19598.627 ; 25941.681) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, None, True))

[1925.366 ; 3556.616) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3556.616 ; 5129.586) | 
[5129.586 ; 6895.171) | 
[6895.171 ; 8713.058) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, OrdinalIgnoreCase, False))

[ 411.510 ; 1197.222) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1197.222 ; 1925.966) | 
[1925.966 ; 2654.709) | 
[2654.709 ; 3605.985) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (, None, True))

[ 535.447 ; 1520.669) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1520.669 ; 2460.814) | 
[2460.814 ; 3552.320) | 
[3552.320 ; 4673.803) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (en-US, IgnoreCase, True))

[  934.801 ;  6050.886) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6050.886 ; 11069.403) | 
[11069.403 ; 17387.864) | 
[17387.864 ; 23263.947) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (pl-PL, None, False))

[ 9691.776 ; 12986.817) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[12986.817 ; 16281.858) | 
[16281.858 ; 19201.050) | 
[19201.050 ; 22937.761) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_DifferentLastChar(Options: (en-US, IgnoreSymbols, False))

[  343.478 ; 10975.753) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[10975.753 ; 21399.639) | 
[21399.639 ; 34353.782) | 
[34353.782 ; 45601.938) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (, None, True))

[1928.097 ; 3540.258) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3540.258 ; 5111.590) | 
[5111.590 ; 6884.287) | 
[6884.287 ; 8712.708) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (, IgnoreCase, True))

[ 3048.322 ;  5833.785) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5833.785 ;  8523.563) | 
[ 8523.563 ; 11844.636) | 
[11844.636 ; 14653.704) | @@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@DrewScoggins DrewScoggins added the tenet-performance-benchmarks Issue from performance benchmark label Jun 12, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Globalization untriaged New issue has not been triaged by the area owner labels Jun 12, 2020
@ghost
Copy link

ghost commented Jun 12, 2020

Tagging subscribers to this area: @tarekgh, @safern, @krwq
Notify danmosemsft if you want to be subscribed.

@DrewScoggins
Copy link
Member Author

DrewScoggins commented Jun 12, 2020

From @adamsitnik

That's definitely a real regression, most probably caused by the switch to ICU by default on Windows (#826).

@tarekgh tarekgh removed the untriaged New issue has not been triaged by the area owner label Jun 12, 2020
@tarekgh tarekgh added this to the 5.0 milestone Jun 12, 2020
@tarekgh
Copy link
Member

tarekgh commented Jun 12, 2020

I am wondering, didn't we already have such differences before when we compared Windows against Linux runs? was it already tracked issues for that?

@DrewScoggins
Copy link
Member Author

I found this issue, @tarekgh #37350, but this looks different then that.

@safern
Copy link
Member

safern commented Jun 12, 2020

I remember @adamsitnik doing some investigations on ICU on Linux earlier this year, he might recall if there is an issue for this API.

@tarekgh
Copy link
Member

tarekgh commented Jun 12, 2020

That is what I was referring to:

#31273
#26054
#13676
#13049
#6074

@tarekgh
Copy link
Member

tarekgh commented Jun 17, 2020

#37919

@adamsitnik
Copy link
Member

The problem is that we have switched to use ICU by default on Windows but I am not sure whether performance regressions were considered. We need to either acknowledge the regressions, don't use ICU by default or somehow try to mitigate all the regressions.

@tarekgh
Copy link
Member

tarekgh commented Jun 17, 2020

@adamsitnik

The problem is that we have switched to use ICU by default on Windows but I am not sure whether performance regressions were considered.

I think this is discussed in the issue #826

We need to either acknowledge the regressions, don't use ICU by default or somehow try to mitigate all the regressions.

mostly agree. The issue is not about Windows only it is really for Linux too. The real complaint we are getting from people running on Linux and comparing the perf with Windows. I think the best we can do is try to help to optimize in most popular scenarios (e.g. when using ordinal ignore case). and possibly we can look at ICU and try to optimize it too if possible.

@DrewScoggins DrewScoggins added tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark os-windows arch-x64 and removed tenet-performance-benchmarks Issue from performance benchmark labels Jul 7, 2020
@DrewScoggins
Copy link
Member Author

We are also seeing these regressions on Ubuntu x64

@DrewScoggins
Copy link
Member Author

DrewScoggins commented Jul 10, 2020

Run Information

Architecture x64
OS ubuntu 18.04
Changes diff

Regressions in System.Globalization.Tests.StringSearch

Benchmark Baseline Test Test/Base Modality Baseline Outlier
IsSuffix_SecondHalf 18.71 ns 208.76 ns 11.16 False
IsSuffix_SecondHalf 101.47 ns 209.13 ns 2.06 Bimodal False
IsPrefix_FirstHalf 18.12 ns 186.63 ns 10.30 False
IsPrefix_FirstHalf 18.16 ns 186.61 ns 10.28 False
IndexOf_Word_NotFound 57.59 ns 371.62 ns 6.45 False
IsPrefix_FirstHalf 74.27 ns 137.92 ns 1.86 False
IsPrefix_FirstHalf 74.27 ns 138.60 ns 1.87 False
IsSuffix_SecondHalf 18.73 ns 208.68 ns 11.14 False
IsPrefix_DifferentFirstChar 5.69 ns 8.71 ns 1.53 Bimodal True
IsPrefix_FirstHalf 18.22 ns 186.85 ns 10.26 False
IndexOf_Word_NotFound 56.78 ns 371.70 ns 6.55 False
IsSuffix_SecondHalf 18.73 ns 208.69 ns 11.14 False
IndexOf_Word_NotFound 57.49 ns 370.03 ns 6.44 False
IsSuffix_SecondHalf 102.44 ns 209.56 ns 2.05 Bimodal False

Related Issue on x64 Windows

[Perf -1,855%] System.Globalization.Tests.StringSearch (32)

Related Issue on x86 Windows

[Perf -1,934%] System.Globalization.Tests.StringSearch (35)

graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Globalization.Tests.StringSearch*';

Histogram

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, IgnoreNonSpace, False))

[  3.392 ;  30.700) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.700 ;  56.491) | 
[ 56.491 ;  82.282) | 
[ 82.282 ; 108.073) | 
[108.073 ; 131.696) | 
[131.696 ; 157.487) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[157.487 ; 183.554) | 
[183.554 ; 209.345) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[209.345 ; 224.959) | @@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (, IgnoreCase, False))

[ 91.950 ; 112.967) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[112.967 ; 133.984) | 
[133.984 ; 154.950) | 
[154.950 ; 175.967) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[175.967 ; 200.055) | 
[200.055 ; 225.538) | @@@@@@@@@@@@@@@@@@@@@@@
[225.538 ; 246.555) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, None, False))

[  2.219 ;  30.105) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.105 ;  56.160) | 
[ 56.160 ;  82.215) | 
[ 82.215 ; 108.269) | 
[108.269 ; 129.420) | 
[129.420 ; 155.475) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[155.475 ; 175.643) | 
[175.643 ; 206.286) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, IgnoreNonSpace, False))

[  2.253 ;  30.127) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.127 ;  56.175) | 
[ 56.175 ;  82.223) | 
[ 82.223 ; 108.272) | 
[108.272 ; 127.326) | 
[127.326 ; 153.374) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[153.374 ; 176.110) | 
[176.110 ; 207.231) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (, None, False))

[  6.869 ;  97.817) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 97.817 ; 185.131) | 
[185.131 ; 272.444) | 
[272.444 ; 326.148) | 
[326.148 ; 413.461) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[413.461 ; 500.774) | 
[500.774 ; 588.088) | 
[588.088 ; 694.762) | 
[694.762 ; 782.075) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (, IgnoreCase, False))

[ 59.560 ;  74.962) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 74.962 ;  90.365) | 
[ 90.365 ; 105.768) | 
[105.768 ; 121.170) | 
[121.170 ; 134.882) | 
[134.882 ; 154.262) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[154.262 ; 169.665) | @@@@@@@@@@@@@@@@
[169.665 ; 185.067) | 
[185.067 ; 203.802) | 
[203.802 ; 219.205) | @@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (en-US, IgnoreCase, False))

[ 59.465 ;  74.874) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 74.874 ;  90.282) | 
[ 90.282 ; 105.691) | 
[105.691 ; 121.099) | 
[121.099 ; 133.935) | 
[133.935 ; 149.343) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[149.343 ; 157.815) | 
[157.815 ; 173.224) | @@@@@@@@@@@@@@@@@
[173.224 ; 188.632) | 
[188.632 ; 204.085) | 
[204.085 ; 219.494) | @@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (, None, False))

[  3.199 ;  30.518) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.518 ;  56.586) | 
[ 56.586 ;  82.654) | 
[ 82.654 ; 108.722) | 
[108.722 ; 130.063) | 
[130.063 ; 156.131) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[156.131 ; 183.470) | 
[183.470 ; 209.538) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[209.538 ; 224.062) | @@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_DifferentFirstChar(Options: (en-US, Ordinal, False))

[ 5.110 ;  5.581) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 5.581 ;  6.105) | @@@@@
[ 6.105 ;  6.388) | @@
[ 6.388 ;  6.947) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6.947 ;  7.417) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 7.417 ;  7.851) | @@@@@@@@
[ 7.851 ;  8.423) | 
[ 8.423 ;  8.894) | @@@@@@
[ 8.894 ;  9.364) | 
[ 9.364 ;  9.835) | 
[ 9.835 ; 10.419) | 
[10.419 ; 10.955) | @@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsPrefix_FirstHalf(Options: (, None, False))

[  2.306 ;  30.030) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.030 ;  55.879) | 
[ 55.879 ;  81.728) | 
[ 81.728 ; 107.577) | 
[107.577 ; 127.508) | 
[127.508 ; 153.357) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[153.357 ; 176.189) | 
[176.189 ; 207.146) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, IgnoreNonSpace, False))

[  6.644 ;  97.043) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 97.043 ; 183.680) | 
[183.680 ; 270.317) | 
[270.317 ; 324.112) | 
[324.112 ; 410.750) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[410.750 ; 497.387) | 
[497.387 ; 584.024) | 
[584.024 ; 686.796) | 
[686.796 ; 773.433) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, None, False))

[  3.417 ;  30.938) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 30.938 ;  56.765) | 
[ 56.765 ;  82.593) | 
[ 82.593 ; 108.421) | 
[108.421 ; 130.242) | 
[130.242 ; 156.070) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[156.070 ; 183.607) | 
[183.607 ; 209.434) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[209.434 ; 223.963) | @@@@@@@@@@

System.Globalization.Tests.StringSearch.IndexOf_Word_NotFound(Options: (en-US, None, False))

[  7.219 ;  98.421) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 98.421 ; 185.062) | 
[185.062 ; 271.702) | 
[271.702 ; 327.351) | 
[327.351 ; 413.991) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[413.991 ; 500.632) | 
[500.632 ; 587.272) | 
[587.272 ; 692.069) | 
[692.069 ; 778.710) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringSearch.IsSuffix_SecondHalf(Options: (en-US, IgnoreCase, False))

[ 91.520 ; 112.658) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[112.658 ; 133.796) | 
[133.796 ; 155.279) | 
[155.279 ; 176.417) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[176.417 ; 200.802) | 
[200.802 ; 221.940) | @@@@@@@@@@@@@@@@@@@@@@@
[221.940 ; 229.947) | 
[229.947 ; 251.085) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@DrewScoggins DrewScoggins added the os-linux Linux OS (any supported distro) label Jul 10, 2020
@adamsitnik
Copy link
Member

I've confirmed that this is an ICU-related issue. Closing and adding to #40942

Method Options 3.1 Mean 5.0 ICU Mean 5.0 NLS Mean
IsPrefix_FirstHalf (, IgnoreCase, False) 279.556 ns 204.122 ns 270.881 ns
IsPrefix_DifferentFirstChar (, IgnoreCase, False) 58.887 ns 18.055 ns 53.431 ns
IsSuffix_SecondHalf (, IgnoreCase, False) 264.358 ns 191.353 ns 262.566 ns
IsSuffix_DifferentLastChar (, IgnoreCase, False) 61.441 ns 18.846 ns 56.044 ns
IndexOf_Word_NotFound (, IgnoreCase, False) 802.657 ns 628.962 ns 798.926 ns
LastIndexOf_Word_NotFound (, IgnoreCase, False) 975.995 ns 620.031 ns 965.195 ns
IsPrefix_FirstHalf (, IgnoreCase, True) 1,012.810 ns 3,677.834 ns 1,019.808 ns
IsPrefix_DifferentFirstChar (, IgnoreCase, True) 72.985 ns 853.547 ns 72.039 ns
IsSuffix_SecondHalf (, IgnoreCase, True) 2,552.799 ns 7,467.664 ns 2,575.991 ns
IsSuffix_DifferentLastChar (, IgnoreCase, True) 5,376.895 ns 1,288.707 ns 5,329.497 ns
IndexOf_Word_NotFound (, IgnoreCase, True) 3,931.968 ns 11,275.663 ns 3,831.631 ns
LastIndexOf_Word_NotFound (, IgnoreCase, True) 3,142.703 ns 17,463.707 ns 3,042.517 ns
IsPrefix_FirstHalf (, None, False) 211.472 ns 173.105 ns 201.325 ns
IsPrefix_DifferentFirstChar (, None, False) 56.298 ns 17.402 ns 53.396 ns
IsSuffix_SecondHalf (, None, False) 182.540 ns 174.536 ns 179.486 ns
IsSuffix_DifferentLastChar (, None, False) 58.275 ns 18.166 ns 55.200 ns
IndexOf_Word_NotFound (, None, False) 699.751 ns 500.508 ns 678.148 ns
LastIndexOf_Word_NotFound (, None, False) 850.232 ns 502.581 ns 845.351 ns
IsPrefix_FirstHalf (, None, True) 1,052.320 ns 3,636.952 ns 1,021.712 ns
IsPrefix_DifferentFirstChar (, None, True) 73.568 ns 848.922 ns 72.912 ns
IsSuffix_SecondHalf (, None, True) 2,595.612 ns 7,554.091 ns 2,540.565 ns
IsSuffix_DifferentLastChar (, None, True) 5,306.733 ns 1,317.628 ns 5,348.958 ns
IndexOf_Word_NotFound (, None, True) 3,935.667 ns 11,177.835 ns 3,803.958 ns
LastIndexOf_Word_NotFound (, None, True) 3,083.463 ns 16,993.198 ns 3,029.761 ns
IsPrefix_FirstHalf (en-US, IgnoreCase, False) 270.134 ns 205.387 ns 273.552 ns
IsPrefix_DifferentFirstChar (en-US, IgnoreCase, False) 57.763 ns 18.110 ns 54.154 ns
IsSuffix_SecondHalf (en-US, IgnoreCase, False) 258.893 ns 190.355 ns 260.361 ns
IsSuffix_DifferentLastChar (en-US, IgnoreCase, False) 58.943 ns 19.272 ns 56.319 ns
IndexOf_Word_NotFound (en-US, IgnoreCase, False) 807.236 ns 622.869 ns 798.647 ns
LastIndexOf_Word_NotFound (en-US, IgnoreCase, False) 975.083 ns 623.089 ns 955.210 ns
IsPrefix_FirstHalf (en-US, IgnoreCase, True) 1,018.976 ns 3,666.344 ns 1,026.411 ns
IsPrefix_DifferentFirstChar (en-US, IgnoreCase, True) 76.465 ns 887.811 ns 72.117 ns
IsSuffix_SecondHalf (en-US, IgnoreCase, True) 2,563.798 ns 7,529.526 ns 2,565.718 ns
IsSuffix_DifferentLastChar (en-US, IgnoreCase, True) 5,305.949 ns 1,304.493 ns 5,346.831 ns
IndexOf_Word_NotFound (en-US, IgnoreCase, True) 3,892.140 ns 11,776.383 ns 3,926.784 ns
LastIndexOf_Word_NotFound (en-US, IgnoreCase, True) 3,090.867 ns 17,430.155 ns 3,072.910 ns
IsPrefix_FirstHalf (en-US, IgnoreNonSpace, False) 1,020.808 ns 178.017 ns 1,017.612 ns
IsPrefix_DifferentFirstChar (en-US, IgnoreNonSpace, False) 67.336 ns 18.067 ns 65.861 ns
IsSuffix_SecondHalf (en-US, IgnoreNonSpace, False) 2,552.693 ns 178.425 ns 2,544.768 ns
IsSuffix_DifferentLastChar (en-US, IgnoreNonSpace, False) 4,921.510 ns 18.199 ns 4,858.353 ns
IndexOf_Word_NotFound (en-US, IgnoreNonSpace, False) 3,906.457 ns 506.498 ns 3,792.084 ns
LastIndexOf_Word_NotFound (en-US, IgnoreNonSpace, False) 3,076.625 ns 507.002 ns 3,048.544 ns
IsPrefix_FirstHalf (en-US, IgnoreSymbols, False) 1,022.075 ns 16,888.924 ns 1,020.346 ns
IsPrefix_DifferentFirstChar (en-US, IgnoreSymbols, False) 70.421 ns 29,267.090 ns 66.428 ns
IsSuffix_SecondHalf (en-US, IgnoreSymbols, False) 3,437.616 ns 19,397.341 ns 3,411.783 ns
IsSuffix_DifferentLastChar (en-US, IgnoreSymbols, False) 5,308.903 ns 34,515.843 ns 5,333.271 ns
IndexOf_Word_NotFound (en-US, IgnoreSymbols, False) 3,310.485 ns 11,414.777 ns 3,285.185 ns
LastIndexOf_Word_NotFound (en-US, IgnoreSymbols, False) 3,468.180 ns 16,640.286 ns 3,393.434 ns
IsPrefix_FirstHalf (en-US, None, False) 205.249 ns 176.915 ns 200.000 ns
IsPrefix_DifferentFirstChar (en-US, None, False) 59.057 ns 17.779 ns 53.980 ns
IsSuffix_SecondHalf (en-US, None, False) 184.039 ns 177.072 ns 181.258 ns
IsSuffix_DifferentLastChar (en-US, None, False) 59.873 ns 18.232 ns 55.897 ns
IndexOf_Word_NotFound (en-US, None, False) 688.002 ns 504.985 ns 681.283 ns
LastIndexOf_Word_NotFound (en-US, None, False) 841.277 ns 506.640 ns 859.611 ns
IsPrefix_FirstHalf (en-US, None, True) 1,026.332 ns 3,676.392 ns 1,129.406 ns
IsPrefix_DifferentFirstChar (en-US, None, True) 72.958 ns 860.499 ns 73.269 ns
IsSuffix_SecondHalf (en-US, None, True) 2,555.954 ns 7,625.414 ns 2,556.183 ns
IsSuffix_DifferentLastChar (en-US, None, True) 5,320.978 ns 1,349.628 ns 5,373.210 ns
IndexOf_Word_NotFound (en-US, None, True) 3,783.346 ns 11,472.314 ns 3,884.931 ns
LastIndexOf_Word_NotFound (en-US, None, True) 3,080.818 ns 17,512.610 ns 3,077.301 ns
IsPrefix_FirstHalf (en-US, Ordinal, False) 12.480 ns 14.469 ns 12.584 ns
IsPrefix_DifferentFirstChar (en-US, Ordinal, False) 6.229 ns 8.496 ns 8.925 ns
IsSuffix_SecondHalf (en-US, Ordinal, False) 14.058 ns 12.034 ns 14.248 ns
IsSuffix_DifferentLastChar (en-US, Ordinal, False) 19.645 ns 17.446 ns 16.225 ns
IndexOf_Word_NotFound (en-US, Ordinal, False) 39.451 ns 37.728 ns 39.207 ns
LastIndexOf_Word_NotFound (en-US, Ordinal, False) 137.367 ns 97.667 ns 98.362 ns
IsPrefix_FirstHalf (en-US, OrdinalIgnoreCase, False) 73.307 ns 82.618 ns 83.575 ns
IsPrefix_DifferentFirstChar (en-US, OrdinalIgnoreCase, False) 9.844 ns 9.585 ns 9.731 ns
IsSuffix_SecondHalf (en-US, OrdinalIgnoreCase, False) 109.128 ns 83.181 ns 80.728 ns
IsSuffix_DifferentLastChar (en-US, OrdinalIgnoreCase, False) 203.785 ns 149.656 ns 141.373 ns
IndexOf_Word_NotFound (en-US, OrdinalIgnoreCase, False) 701.811 ns 3,125.640 ns 705.609 ns
LastIndexOf_Word_NotFound (en-US, OrdinalIgnoreCase, False) 617.823 ns 3,161.417 ns 621.380 ns
IsPrefix_FirstHalf (pl-PL, None, False) 2,594.625 ns 5,704.863 ns 2,558.898 ns
IsPrefix_DifferentFirstChar (pl-PL, None, False) 101.082 ns 857.463 ns 98.650 ns
IsSuffix_SecondHalf (pl-PL, None, False) 8,633.560 ns 8,435.046 ns 8,586.963 ns
IsSuffix_DifferentLastChar (pl-PL, None, False) 19,423.848 ns 1,216.271 ns 17,376.208 ns
IndexOf_Word_NotFound (pl-PL, None, False) 9,534.684 ns 14,329.673 ns 9,455.980 ns
LastIndexOf_Word_NotFound (pl-PL, None, False) 8,689.332 ns 18,014.702 ns 8,657.101 ns

@adamsitnik adamsitnik removed the tenet-performance-benchmarks Issue from performance benchmark label Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-System.Globalization os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

5 participants