<chrono>: optimize chrono::steady_clock::now()#2086
<chrono>: optimize chrono::steady_clock::now()#2086StephanTLavavej merged 4 commits intomicrosoft:mainfrom
<chrono>: optimize chrono::steady_clock::now()#2086Conversation
Co-authored-by: Bruce Dawson <brucedawson@chromium.org>
<chrono>: optimize chrono::steady_clock::now()
Co-authored-by: Bruce Dawson <brucedawson@chromium.org>
This reverts commit 87a8d69.
|
Looks good. Land it! |
|
Sorry, I forgot about: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4640?view=msvc-160 It's not a big deal. Without |
Co-authored-by: Alex Guteniev <gutenev@gmail.com>
|
I indeed observe QPF == 10M on my 4 physical machines, all Win10: #2085 (comment) |
|
Looks good to me. I note that in this case the race on the static variable would seem benign, but we like to avoid even those races so since removing the static variable doesn't make much difference I prefer just keeping it removed. |
|
@barcharcraz Magic statics would avoid data races, but we avoid magic statics in product code, see #673 (comment) . |
|
I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed. |
|
Thanks for optimizing this time-sensitive timing function! 😻 🚀 ⚡ |

Closes #2085