Skip to content

Conversation

cpplearner
Copy link
Contributor

@cpplearner cpplearner commented Mar 1, 2022

This is an alternative to #2596.

Fixes #2594

I thought of simply returning a global _Fmt_codec<char> object in _Get_fmt_codec<char>(), but I think this might make std::format unusable in initialization of variable template instances. (The standard says that such initializations are unordered with other initializations.)

@cpplearner cpplearner requested a review from a team as a code owner March 1, 2022 14:17
@barcharcraz

This comment was marked as resolved.

Copy link
Contributor

@barcharcraz barcharcraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me, though someone who understands more about object lifetime should look at the caching component.

@StephanTLavavej StephanTLavavej added the blocked Something is preventing work on this label Mar 11, 2022
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej removed the blocked Something is preventing work on this label Mar 19, 2022
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej self-assigned this Mar 25, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit f307b76 into microsoft:main Mar 28, 2022
@StephanTLavavej
Copy link
Member

Thanks for improving <format> performance with these codepages! 🚀 ⚡ 🚅

@cpplearner cpplearner deleted the patch-1 branch May 7, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format C++20/23 format performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<format>: Could the output of __std_get_cvt be cached?
6 participants