<chrono>: Optimize to_sys and to_local - #3579
Merged
Stephan T. Lavavej (StephanTLavavej) merged 4 commits intoMar 28, 2023
Merged
<chrono>: Optimize to_sys and to_local#3579Stephan T. Lavavej (StephanTLavavej) merged 4 commits into
<chrono>: Optimize to_sys and to_local#3579Stephan T. Lavavej (StephanTLavavej) merged 4 commits into
Conversation
Stephan T. Lavavej (StephanTLavavej)
requested changes
Mar 18, 2023
Stephan T. Lavavej (StephanTLavavej)
self-requested a review
March 19, 2023 20:08
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Mar 25, 2023
Member
|
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:
|
nicole mazzuca (strega-nil-ms)
suggested changes
Mar 27, 2023
nicole mazzuca (strega-nil-ms)
left a comment
Contributor
There was a problem hiding this comment.
Minor comments requested.
|
|
||
| if (_Type == __std_tzdb_sys_info_type::_Offset_and_range) { | ||
| return _Info.release(); | ||
| } |
Contributor
There was a problem hiding this comment.
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!)
Contributor
|
Stephan T. Lavavej (@StephanTLavavej) pushed changes after you approved. |
nicole mazzuca (strega-nil-ms)
approved these changes
Mar 27, 2023
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Mar 27, 2023
Member
|
Thanks, great comment! 😻 |
Member
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Member
|
Thanks - must go faster! 🚗 🦖 ⌚ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... by only retrieving necessary information.
This makes
to_local3x faster on my machine (although it's still hundreds times slower thanlocaltime).