Skip to content

[JitDiff X64] [Copilot] Replace string.Compare == 0 patterns with Equals/Sta ... #1772

@MihuBot

Description

@MihuBot

Job completed in 17 minutes 21 seconds (remote runner delay: 1 minute 16 seconds).
dotnet/runtime#124566

Main commit: dotnet/runtime@736475c
PR commit: dotnet/runtime@523b252

Diffs

Diffs
Found 96 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 45371543
Total bytes of diff: 45372951
Total bytes of delta: 1408 (0.00 % of base)
Total relative delta: 3.35
    diff is a regression.
    relative diff is a regression.


Top file regressions (bytes):
         852 : System.Private.Xml.Linq.dasm (0.44 % of base)
         225 : System.Net.Primitives.dasm (0.20 % of base)
         208 : System.Net.Http.dasm (0.02 % of base)
         201 : System.Configuration.ConfigurationManager.dasm (0.05 % of base)
         156 : System.Net.WebProxy.dasm (2.74 % of base)
         129 : System.Data.Odbc.dasm (0.05 % of base)
          77 : System.Private.DataContractSerialization.dasm (0.01 % of base)
          49 : System.Net.HttpListener.dasm (0.05 % of base)

Top file improvements (bytes):
        -151 : System.Private.CoreLib.dasm (-0.00 % of base)
        -117 : System.ComponentModel.TypeConverter.dasm (-0.04 % of base)
         -91 : System.Private.Xml.dasm (-0.00 % of base)
         -59 : System.Net.Mail.dasm (-0.04 % of base)
         -37 : System.Data.Common.dasm (-0.00 % of base)
         -34 : System.Runtime.Caching.dasm (-0.06 % of base)

14 total files with Code Size differences (6 improved, 8 regressed), 247 unchanged.

Top method regressions (bytes):
         225 (57.69 % of base) : System.Net.Primitives.dasm - System.Net.CredentialCacheKey:IsPrefix(System.Uri,int):bool:this (FullOpts)
         225 (57.69 % of base) : System.Net.Http.dasm - System.Net.CredentialCacheKey:IsPrefix(System.Uri,int):bool:this (FullOpts)
         156 (31.08 % of base) : System.Net.WebProxy.dasm - System.Net.WebProxy:IsLocal(System.Uri):bool (FullOpts)
         129 (62.32 % of base) : System.Data.Odbc.dasm - System.Data.Odbc.CStringTokenizer:StartsWith(System.String):bool:this (FullOpts)
         122 (11.43 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XNamespace:Get(System.String,int,int):System.Xml.Linq.XNamespace (FullOpts)
         120 (60.00 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.UrlPath:IsEqualOrSubpathImpl(System.String,System.String,bool):bool (FullOpts)
         106 (44.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.UrlPath:IsEqualOrSubdirectory(System.String,System.String):bool (FullOpts)
          92 (23.35 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[byte]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.17 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[double]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[int]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[long]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[short]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.__Canon]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          89 (23.00 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.Nullable`1[int]]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          89 (22.31 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.Numerics.Vector`1[float]]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          77 (23.19 % of base) : System.Private.DataContractSerialization.dasm - System.Runtime.Serialization.DataContracts.EnumDataContract:ReadEnumValue(System.String,int,int):long:this (FullOpts)
          60 (24.00 % of base) : System.Private.CoreLib.dasm - System.Security.SecurityElement:GetUnescapeSequence(System.String,int,byref):System.String (FullOpts)
          26 (1.30 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.ClientConfigPaths:.ctor(System.String,bool):this (FullOpts)
          25 (35.21 % of base) : System.Net.HttpListener.dasm - System.Net.HttpListenerContext:IsBasicHeader(System.String):bool (FullOpts)
          24 (2.54 % of base) : System.Net.HttpListener.dasm - System.Net.HttpListener:AddPrefix(System.String):this (FullOpts)
          18 (12.68 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.AppSettingsReader:GetNoneNesting(System.String):int (FullOpts)
           2 (0.35 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:VerifySectionName(System.String,System.Configuration.Internal.IConfigErrorInfo,bool) (FullOpts)
           2 (0.35 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.MgmtConfigurationRecord:GetDescendentSectionFactories(System.String):System.Collections.ArrayList:this (FullOpts)
           2 (0.34 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.MgmtConfigurationRecord:GetDescendentSectionGroupFactories(System.String):System.Collections.ArrayList:this (FullOpts)

Top method improvements (bytes):
        -205 (-11.09 % of base) : System.Private.CoreLib.dasm - System.Environment:ReadXdgDirectory(System.String,System.String,System.String):System.String (FullOpts)
         -59 (-8.32 % of base) : System.Net.Mail.dasm - System.Net.Mail.SmtpConnection:ParseExtensions(System.String[]):this (FullOpts)
         -44 (-3.47 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.ComponentResourceManager:ApplyResources(System.Object,System.Type,System.String,System.Globalization.CultureInfo):this (FullOpts)
         -38 (-11.08 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection:get_Item(System.String):System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection:this (FullOpts)
         -37 (-3.25 % of base) : System.Data.Common.dasm - System.Data.DataTable:ParseSortString(System.String):System.Data.IndexField[]:this (FullOpts)
         -35 (-14.29 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.ReflectPropertyDescriptor:OnINotifyPropertyChanged(System.Object,System.ComponentModel.PropertyChangedEventArgs):this (FullOpts)
         -34 (-30.36 % of base) : System.Runtime.Caching.dasm - System.Runtime.Caching.FileChangeNotificationSystem+FileChangeEventTarget:EqualsIgnoreCase(System.String,System.String):bool (FullOpts)
         -31 (-16.58 % of base) : System.Private.Xml.dasm - MS.Internal.Xml.XPath.StringFunctions:StartsWith(System.Xml.XPath.XPathNodeIterator):bool:this (FullOpts)
         -30 (-22.56 % of base) : System.Private.Xml.dasm - System.Xml.Schema.XdrBuilder:IsXdrSchema(System.String):bool (FullOpts)
         -30 (-60.00 % of base) : System.Private.Xml.dasm - System.Xml.Xsl.Runtime.XsltFunctions:StartsWith(System.String,System.String):bool (FullOpts)
         -25 (-20.16 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:IsReservedAttributeName(System.String):bool (FullOpts)
         -18 (-32.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.StringUtil:StartsWithOrdinal(System.String,System.String):bool (FullOpts)
         -18 (-32.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.StringUtil:StartsWithOrdinalIgnoreCase(System.String,System.String):bool (FullOpts)
         -17 (-2.32 % of base) : System.Net.Http.dasm - System.Net.Http.Headers.AuthenticationHeaderValue:GetAuthenticationLength(System.String,int,byref):int (FullOpts)
         -10 (-5.78 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.ConfigurationElement:IsLockAttributeName(System.String):bool (FullOpts)
          -6 (-0.19 % of base) : System.Private.CoreLib.dasm - System.Globalization.IdnMapping:PunycodeDecode(System.String):System.String (FullOpts)
          -4 (-0.22 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:ScanLocationSection(System.Configuration.XmlUtil):this (FullOpts)

Top method regressions (percentages):
         129 (62.32 % of base) : System.Data.Odbc.dasm - System.Data.Odbc.CStringTokenizer:StartsWith(System.String):bool:this (FullOpts)
         120 (60.00 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.UrlPath:IsEqualOrSubpathImpl(System.String,System.String,bool):bool (FullOpts)
         225 (57.69 % of base) : System.Net.Primitives.dasm - System.Net.CredentialCacheKey:IsPrefix(System.Uri,int):bool:this (FullOpts)
         225 (57.69 % of base) : System.Net.Http.dasm - System.Net.CredentialCacheKey:IsPrefix(System.Uri,int):bool:this (FullOpts)
         106 (44.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.UrlPath:IsEqualOrSubdirectory(System.String,System.String):bool (FullOpts)
          25 (35.21 % of base) : System.Net.HttpListener.dasm - System.Net.HttpListenerContext:IsBasicHeader(System.String):bool (FullOpts)
         156 (31.08 % of base) : System.Net.WebProxy.dasm - System.Net.WebProxy:IsLocal(System.Uri):bool (FullOpts)
          60 (24.00 % of base) : System.Private.CoreLib.dasm - System.Security.SecurityElement:GetUnescapeSequence(System.String,int,byref):System.String (FullOpts)
          92 (23.35 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[byte]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[int]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[long]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[short]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          92 (23.23 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.__Canon]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          77 (23.19 % of base) : System.Private.DataContractSerialization.dasm - System.Runtime.Serialization.DataContracts.EnumDataContract:ReadEnumValue(System.String,int,int):long:this (FullOpts)
          92 (23.17 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[double]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          89 (23.00 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.Nullable`1[int]]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          89 (22.31 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XHashtable`1+XHashtableState[System.Numerics.Vector`1[float]]:FindEntry(int,System.String,int,int,byref):bool:this (FullOpts)
          18 (12.68 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.AppSettingsReader:GetNoneNesting(System.String):int (FullOpts)
         122 (11.43 % of base) : System.Private.Xml.Linq.dasm - System.Xml.Linq.XNamespace:Get(System.String,int,int):System.Xml.Linq.XNamespace (FullOpts)
          24 (2.54 % of base) : System.Net.HttpListener.dasm - System.Net.HttpListener:AddPrefix(System.String):this (FullOpts)
          26 (1.30 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.ClientConfigPaths:.ctor(System.String,bool):this (FullOpts)
           2 (0.35 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:VerifySectionName(System.String,System.Configuration.Internal.IConfigErrorInfo,bool) (FullOpts)
           2 (0.35 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.MgmtConfigurationRecord:GetDescendentSectionFactories(System.String):System.Collections.ArrayList:this (FullOpts)
           2 (0.34 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.MgmtConfigurationRecord:GetDescendentSectionGroupFactories(System.String):System.Collections.ArrayList:this (FullOpts)

Top method improvements (percentages):
         -30 (-60.00 % of base) : System.Private.Xml.dasm - System.Xml.Xsl.Runtime.XsltFunctions:StartsWith(System.String,System.String):bool (FullOpts)
         -18 (-32.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.StringUtil:StartsWithOrdinal(System.String,System.String):bool (FullOpts)
         -18 (-32.73 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.StringUtil:StartsWithOrdinalIgnoreCase(System.String,System.String):bool (FullOpts)
         -34 (-30.36 % of base) : System.Runtime.Caching.dasm - System.Runtime.Caching.FileChangeNotificationSystem+FileChangeEventTarget:EqualsIgnoreCase(System.String,System.String):bool (FullOpts)
         -30 (-22.56 % of base) : System.Private.Xml.dasm - System.Xml.Schema.XdrBuilder:IsXdrSchema(System.String):bool (FullOpts)
         -25 (-20.16 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:IsReservedAttributeName(System.String):bool (FullOpts)
         -31 (-16.58 % of base) : System.Private.Xml.dasm - MS.Internal.Xml.XPath.StringFunctions:StartsWith(System.Xml.XPath.XPathNodeIterator):bool:this (FullOpts)
         -35 (-14.29 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.ReflectPropertyDescriptor:OnINotifyPropertyChanged(System.Object,System.ComponentModel.PropertyChangedEventArgs):this (FullOpts)
        -205 (-11.09 % of base) : System.Private.CoreLib.dasm - System.Environment:ReadXdgDirectory(System.String,System.String,System.String):System.String (FullOpts)
         -38 (-11.08 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection:get_Item(System.String):System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection:this (FullOpts)
         -59 (-8.32 % of base) : System.Net.Mail.dasm - System.Net.Mail.SmtpConnection:ParseExtensions(System.String[]):this (FullOpts)
         -10 (-5.78 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.ConfigurationElement:IsLockAttributeName(System.String):bool (FullOpts)
         -44 (-3.47 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.ComponentResourceManager:ApplyResources(System.Object,System.Type,System.String,System.Globalization.CultureInfo):this (FullOpts)
         -37 (-3.25 % of base) : System.Data.Common.dasm - System.Data.DataTable:ParseSortString(System.String):System.Data.IndexField[]:this (FullOpts)
         -17 (-2.32 % of base) : System.Net.Http.dasm - System.Net.Http.Headers.AuthenticationHeaderValue:GetAuthenticationLength(System.String,int,byref):int (FullOpts)
          -4 (-0.22 % of base) : System.Configuration.ConfigurationManager.dasm - System.Configuration.BaseConfigurationRecord:ScanLocationSection(System.Configuration.XmlUtil):this (FullOpts)
          -6 (-0.19 % of base) : System.Private.CoreLib.dasm - System.Globalization.IdnMapping:PunycodeDecode(System.String):System.String (FullOpts)

41 total methods with Code Size differences (17 improved, 24 regressed), 284095 unchanged.

--------------------------------------------------------------------------------

Artifacts:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions