Skip to content

[Perf -97%] System.Globalization.Tests.StringEquality (8) #39038

Closed

Description

@DrewScoggins

Run Information

Architecture x64
OS Windows 10.0.18362
Changes diff

Regressions in System.Globalization.Tests.StringEquality

Benchmark Baseline Test Test/Base Modality Baseline Outlier
Compare_Same_Upper 4.72 μs 8.18 μs 1.73 True
Compare_Same_Upper 9.44 μs 12.66 μs 1.34 False
Compare_Same_Upper 3.44 μs 8.16 μs 2.37 True
Compare_DifferentFirstChar 8.21 μs 25.35 μs 3.09 False
Compare_DifferentFirstChar 6.09 ns 11.43 ns 1.88 Bimodal True
Compare_Same_Upper 4.71 μs 8.17 μs 1.73 False
Compare_Same_Upper 3.43 μs 8.18 μs 2.38 False

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.StringEquality*';
Details

Histogram

System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (, None))

[4667.947 ; 5078.079) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[5078.079 ; 5488.210) | 
[5488.210 ; 5898.341) | 
[5898.341 ; 6308.473) | 
[6308.473 ; 6718.604) | 
[6718.604 ; 7128.736) | 
[7128.736 ; 7538.867) | 
[7538.867 ; 7968.920) | 
[7968.920 ; 8392.936) | @@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (en-US, IgnoreSymbols))

[ 9295.993 ;  9673.903) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 9673.903 ; 10051.812) | 
[10051.812 ; 10564.578) | @
[10564.578 ; 10942.487) | 
[10942.487 ; 11320.397) | 
[11320.397 ; 11698.306) | 
[11698.306 ; 12076.216) | 
[12076.216 ; 12441.656) | 
[12441.656 ; 12864.431) | @@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (, IgnoreCase))

[3127.674 ; 3712.307) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3712.307 ; 4425.064) | @@
[4425.064 ; 4984.410) | 
[4984.410 ; 5543.755) | 
[5543.755 ; 6103.100) | 
[6103.100 ; 6662.446) | 
[6662.446 ; 7221.791) | 
[7221.791 ; 7886.325) | 
[7886.325 ; 8472.382) | @@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringEquality.Compare_DifferentFirstChar(Count: 1024, Options: (en-US, IgnoreSymbols))

[ 7477.116 ;  9498.049) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 9498.049 ; 11518.983) | 
[11518.983 ; 13539.916) | 
[13539.916 ; 15560.849) | 
[15560.849 ; 17581.783) | 
[17581.783 ; 19602.716) | 
[19602.716 ; 21623.650) | 
[21623.650 ; 23644.583) | 
[23644.583 ; 24328.634) | 
[24328.634 ; 26409.053) | @@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringEquality.Compare_DifferentFirstChar(Count: 1024, Options: (en-US, Ordinal))

[ 6.003 ;  6.577) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6.577 ;  6.790) | @@@@@@@
[ 6.790 ;  7.364) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 7.364 ;  7.930) | @@@@@@@@@@@@@@@@@@@@@@@@
[ 7.930 ;  8.504) | 
[ 8.504 ;  9.078) | 
[ 9.078 ;  9.652) | 
[ 9.652 ; 10.226) | 
[10.226 ; 10.800) | 
[10.800 ; 11.295) | @@
[11.295 ; 11.869) | @@@@@@@@@@@@
[11.869 ; 12.589) | @@@

System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (en-US, None))

[4661.917 ; 5073.742) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[5073.742 ; 5485.568) | 
[5485.568 ; 5897.394) | 
[5897.394 ; 6309.220) | 
[6309.220 ; 6721.045) | 
[6721.045 ; 7132.871) | 
[7132.871 ; 7544.697) | 
[7544.697 ; 7958.333) | 
[7958.333 ; 8396.065) | @@@@@@@@@@@@@@@@@@@@

System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (en-US, IgnoreCase))

[3126.500 ; 3713.528) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3713.528 ; 4413.095) | @
[4413.095 ; 4972.024) | 
[4972.024 ; 5530.953) | 
[5530.953 ; 6089.882) | 
[6089.882 ; 6648.811) | 
[6648.811 ; 7207.740) | 
[7207.740 ; 7878.870) | 
[7878.870 ; 8455.535) | @@@@@@@@@@@@@@@@@@@@

Docs

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

Activity

  1. safern commented on Jul 9, 2020

    @safern
    Member

    This is due to Windows now using ICU instead of NLS.

    @tarekgh do we want to mark this as 5.0.0?

  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 9, 2020
  3. added this to the 5.0.0 milestone on Jul 9, 2020
  4. added
    enhancementProduct code improvement that does NOT require public API changes/additions
    on Jul 9, 2020
  5. tarekgh commented on Jul 9, 2020

    @tarekgh
    Member

    @safern I have marked for 5.0 for now. properly later we'll close some of them as duplicates to others and I expect we'll move some to 6.0 with updating the baseline.

  6. safern commented on Jul 9, 2020

    @safern
    Member

    Sounds good.

  7. DrewScoggins commented on Jul 10, 2020

    @DrewScoggins
    MemberAuthor

    Also seeing regressions on Ubuntu x64.

  8. DrewScoggins commented on Jul 10, 2020

    @DrewScoggins
    MemberAuthor

    Run Information

    Architecture x64
    OS ubuntu 18.04
    Changes diff

    Regressions in System.Globalization.Tests.StringEquality

    Benchmark Baseline Test Test/Base Modality Baseline Outlier
    Compare_Same 688.71 ns 1.14 μs 1.65 False
    Compare_Same_Upper 845.96 ns 1.43 μs 1.70 Bimodal False

    Related Issue on x64 Windows

    [Perf -97%] System.Globalization.Tests.StringEquality (8)

    Related Issue on x86 Windows

    [Perf -176%] System.Globalization.Tests.StringEquality (7)

    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.StringEquality*';
    Details

    Histogram

    System.Globalization.Tests.StringEquality.Compare_Same(Count: 1024, Options: (en-US, OrdinalIgnoreCase))

    [ 649.403 ;  742.961) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    [ 742.961 ;  836.518) | 
    [ 836.518 ;  930.075) | 
    [ 930.075 ; 1023.632) | 
    [1023.632 ; 1104.030) | 
    [1104.030 ; 1197.587) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    System.Globalization.Tests.StringEquality.Compare_Same_Upper(Count: 1024, Options: (en-US, OrdinalIgnoreCase))

    [ 809.067 ;  937.796) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    [ 937.796 ;  994.425) | 
    [ 994.425 ; 1123.153) | @@
    [1123.153 ; 1251.881) | 
    [1251.881 ; 1380.610) | 
    [1380.610 ; 1536.129) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    [1536.129 ; 1659.752) | @@@@@@@@@@@@@@@@@@@
    

    Docs

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

  9. tarekgh commented on Jul 10, 2020

    @tarekgh
    Member

    Thanks @DrewScoggins. Is this means we have this regression on Linux since February? I am just trying to know what could be the change caused such regression and why this is not reported earlier.

  10. DrewScoggins commented on Jul 10, 2020

    @DrewScoggins
    MemberAuthor

    Probably closer to Mid-November. As for why we are finding this now, we haven't really been doing the level of comparison that we are doing now, partly because we didn't have the tooling to do it efficiently. The hope is that going forward we are going to be able to find this stuff much faster.

  11. ericstj commented on Aug 17, 2020

    @ericstj
    Member

    Is this issue tracking the Windows regression or Linux? If Windows I imagine we could just use the uber-ICU regression issue (#40942) for tracking, if linux, please make that clear in title and indicate Windows issue is out of scope.

  12. adamsitnik commented on Aug 17, 2020

    @adamsitnik
    Member

    I've confirmed that it's related to ICU change, closing this and adding to #40942

    Method Count Options 3.1 Mean 5.0 ICU Mean 5.0 NLS Mean
    Compare_Same 1024 (, IgnoreCase) 996.299 ns 575.414 ns 997.39 ns
    Compare_Same_Upper 1024 (, IgnoreCase) 3,373.889 ns 6,798.371 ns 3,356.57 ns
    Compare_DifferentFirstChar 1024 (, IgnoreCase) 43.730 ns 37.378 ns 42.73 ns
    Compare_Same 1024 (, None) 1,003.408 ns 572.528 ns 1,003.25 ns
    Compare_Same_Upper 1024 (, None) 4,123.875 ns 6,747.893 ns 4,033.30 ns
    Compare_DifferentFirstChar 1024 (, None) 41.883 ns 34.904 ns 43.04 ns
    Compare_Same 1024 (en-US, IgnoreCase) 992.625 ns 564.239 ns 1,012.86 ns
    Compare_Same_Upper 1024 (en-US, IgnoreCase) 3,334.161 ns 6,789.031 ns 3,336.49 ns
    Compare_DifferentFirstChar 1024 (en-US, IgnoreCase) 41.821 ns 36.251 ns 41.92 ns
    Compare_Same 1024 (en-US, IgnoreNonSpace) 1,667.106 ns 564.521 ns 1,671.78 ns
    Compare_Same_Upper 1024 (en-US, IgnoreNonSpace) 9,547.973 ns 2,103.148 ns 9,599.69 ns
    Compare_DifferentFirstChar 1024 (en-US, IgnoreNonSpace) 66.929 ns 35.786 ns 59.21 ns
    Compare_Same 1024 (en-US, IgnoreSymbols) 1,676.295 ns 569.468 ns 1,679.39 ns
    Compare_Same_Upper 1024 (en-US, IgnoreSymbols) 9,100.891 ns 11,605.391 ns 9,075.81 ns
    Compare_DifferentFirstChar 1024 (en-US, IgnoreSymbols) 8,219.648 ns 21,916.551 ns 8,311.14 ns
    Compare_Same 1024 (en-US, None) 988.500 ns 572.970 ns 1,005.15 ns
    Compare_Same_Upper 1024 (en-US, None) 4,040.998 ns 6,740.818 ns 4,007.38 ns
    Compare_DifferentFirstChar 1024 (en-US, None) 41.931 ns 35.349 ns 42.87 ns
    Compare_Same 1024 (en-US, Ordinal) 82.818 ns 67.527 ns 68.47 ns
    Compare_Same_Upper 1024 (en-US, Ordinal) 13.907 ns 14.796 ns 14.82 ns
    Compare_DifferentFirstChar 1024 (en-US, Ordinal) 5.432 ns 9.946 ns 10.27 ns
    Compare_Same 1024 (en-US, OrdinalIgnoreCase) 815.592 ns 822.866 ns 834.45 ns
    Compare_Same_Upper 1024 (en-US, OrdinalIgnoreCase) 1,225.463 ns 1,218.922 ns 1,253.77 ns
    Compare_DifferentFirstChar 1024 (en-US, OrdinalIgnoreCase) 10.517 ns 11.977 ns 11.30 ns
    Compare_Same 1024 (pl-PL, None) 21,378.839 ns 572.036 ns 21,617.36 ns
    Compare_Same_Upper 1024 (pl-PL, None) 22,136.295 ns 17,518.080 ns 22,375.84 ns
    Compare_DifferentFirstChar 1024 (pl-PL, None) 61.794 ns 37.698 ns 62.93 ns
  13. ghost locked as resolved and limited conversation to collaborators on Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions