Skip to content
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

Cache _Fmt_codec<char, false> #2600

Merged
merged 1 commit into from
Mar 28, 2022
Merged

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
stl/inc/format Outdated Show resolved Hide resolved
stl/inc/chrono Outdated Show resolved Hide resolved
@barcharcraz

This comment was marked as resolved.

Copy link
Member

@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.

stl/inc/format Show resolved Hide resolved
@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.

stl/inc/format Show resolved Hide 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