projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d65799
)
Avoid allocating in TimeZoneInfo.GetHashCode() (#8513)
author
Justin Van Patten
<jvp@justinvp.com>
Thu, 8 Dec 2016 21:21:43 +0000
(13:21 -0800)
committer
Jan Kotas
<jkotas@microsoft.com>
Thu, 8 Dec 2016 21:21:43 +0000
(13:21 -0800)
Avoid the intermediate ToUpper string allocation.
src/mscorlib/src/System/TimeZoneInfo.cs
patch
|
blob
|
history
diff --git
a/src/mscorlib/src/System/TimeZoneInfo.cs
b/src/mscorlib/src/System/TimeZoneInfo.cs
index
5000206
..
d8662d4
100644
(file)
--- 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
);
}
//