-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize DateTimeOffset.UtcNow by removing redundant verification #45281
optimize DateTimeOffset.UtcNow by removing redundant verification #45281
Conversation
…ts 10% of time on Windows
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Co-authored-by: Stephen Toub <[email protected]>
Need to change expected exception type in test |
…ate to make sure thrown exceptions do not change
thanks! I could not find the failure logs due to #45357 I was not sure about changing the thrown exception (it would be a breaking change?) so I've changed the order of passed arguments. |
It's a more derived exception so would be ok; though the test was doing an exact match which is why it broke |
cuts 10% of the time on Windows and contributes to the Caching TE benchmark
the Caching benchmark shows +4.5% RPS improvement on Windows: