-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<chrono>
: Optimize to_sys
and to_local
#3579
Conversation
I believe that this is correct and ABI-safe. In particular, I believe that it doesn't need to wait for the 17.8 Preview 1 unlocked redist. That's because both forms of mixing are compatible:
|
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.
Minor comments requested.
@@ -545,6 +555,10 @@ void __stdcall __std_tzdb_delete_current_zone(__std_tzdb_current_zone_info* cons | |||
return _Report_error(_Info, __std_tzdb_error::_Icu_error); | |||
} | |||
|
|||
if (_Type == __std_tzdb_sys_info_type::_Offset_and_range) { | |||
return _Info.release(); | |||
} |
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.
Noting that if _Type \notin {0, 1, 2}
, you'll get the full info; this means that future extensions will get all of the info, which seems reasonable, and means it'll be easy to extend. (no change requested, this is great!)
@StephanTLavavej pushed changes after you approved. |
Thanks, great comment! 😻 |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks - must go faster! 🚗 🦖 ⌚ |
... by only retrieving necessary information.
This makes
to_local
3x faster on my machine (although it's still hundreds times slower thanlocaltime
).