Fix perf of DateTime.Now on Unix
authorEric Erhardt <eric.erhardt@microsoft.com>
Thu, 13 Apr 2017 20:21:58 +0000 (15:21 -0500)
committerEric Erhardt <eric.erhardt@microsoft.com>
Thu, 13 Apr 2017 20:21:58 +0000 (15:21 -0500)
commit4cfbfdc580521753ec31b444317fba59ebbee0ae
tree0e7591d13ae225f00dd203262ab6b24c54110eee
parent14911141cfb6a9023718310e00f07046a3ad83b9
Fix perf of DateTime.Now on Unix

Profiling DateTime.Now on Unix shows that a lot of time is spent in GetPreviousAdjustmentRule and AdjustmentRule::Equals. Instead, it is safe to use ReferenceEquals, which increases the performance of DateTime.Now and other time zone operations on Unix.

Commit migrated from https://github.com/dotnet/coreclr/commit/3aec163d4a1431b89f6e1ec22d9b88c13b399a66
src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs