summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/StringComparer.cs
diff options
context:
space:
mode:
authorLevi Broderick <GrabYourPitchforks@users.noreply.github.com>2018-10-11 16:25:20 -0700
committerGitHub <noreply@github.com>2018-10-11 16:25:20 -0700
commite2bcca7d9d0e36510eaba9b1028e16a5de39cee9 (patch)
tree137065ea7bf2f8af53e71e3249557812824a041c /src/System.Private.CoreLib/shared/System/StringComparer.cs
parent907c013a7f5bf6ef4e37519ca27b7ea6fb998153 (diff)
downloadcoreclr-e2bcca7d9d0e36510eaba9b1028e16a5de39cee9.tar.gz
coreclr-e2bcca7d9d0e36510eaba9b1028e16a5de39cee9.tar.bz2
coreclr-e2bcca7d9d0e36510eaba9b1028e16a5de39cee9.zip
Improve performance of OrdinalIgnoreCase hash code calculation (#20309)
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/StringComparer.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/StringComparer.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/StringComparer.cs b/src/System.Private.CoreLib/shared/System/StringComparer.cs
index 47731cb782..cec4b894e0 100644
--- a/src/System.Private.CoreLib/shared/System/StringComparer.cs
+++ b/src/System.Private.CoreLib/shared/System/StringComparer.cs
@@ -307,7 +307,7 @@ namespace System
if (_ignoreCase)
{
- return CompareInfo.GetIgnoreCaseHash(obj);
+ return obj.GetHashCodeOrdinalIgnoreCase();
}
return obj.GetHashCode();
@@ -375,7 +375,7 @@ namespace System
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj);
}
- return CompareInfo.GetIgnoreCaseHash(obj);
+ return obj.GetHashCodeOrdinalIgnoreCase();
}
public void GetObjectData(SerializationInfo info, StreamingContext context)