optimize DateTimeOffset.UtcNow by removing redundant verification (#45281)
authorAdam Sitnik <adam.sitnik@gmail.com>
Mon, 30 Nov 2020 17:05:00 +0000 (18:05 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Nov 2020 17:05:00 +0000 (18:05 +0100)
commit00417dedbfae72d8b2c8f405e95709e09feb0702
tree9e21d5a6da649deaed5b6fb7b7de6bb301d4e53e
parent839ad29b16a8baf7b1470f13d7faa0ce941769b3
optimize DateTimeOffset.UtcNow by removing redundant verification (#45281)

* optimize DateTimeOffset.UtcNow by removing redundant verification, cuts 10% of time on Windows

* Update src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs