summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Van Patten <jvp@justinvp.com>2016-12-08 13:21:43 -0800
committerJan Kotas <jkotas@microsoft.com>2016-12-08 13:21:43 -0800
commitbf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e (patch)
treeed83243e7b846b06005bdab257d74983a3de1e4b /src
parent6d657999abeef7e5410af28c1273feb133ca6c7d (diff)
downloadcoreclr-bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e.tar.gz
coreclr-bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e.tar.bz2
coreclr-bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e.zip
Avoid allocating in TimeZoneInfo.GetHashCode() (#8513)
Avoid the intermediate ToUpper string allocation.
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/src/System/TimeZoneInfo.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mscorlib/src/System/TimeZoneInfo.cs b/src/mscorlib/src/System/TimeZoneInfo.cs
index 5000206295..d8662d477c 100644
--- a/src/mscorlib/src/System/TimeZoneInfo.cs
+++ b/src/mscorlib/src/System/TimeZoneInfo.cs
@@ -969,7 +969,7 @@ namespace System {
// GetHashCode -
//
public override int GetHashCode() {
- return m_id.ToUpper(CultureInfo.InvariantCulture).GetHashCode();
+ return StringComparer.OrdinalIgnoreCase.GetHashCode(m_id);
}
//