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

<format>: Could the output of __std_get_cvt be cached? #2594

Closed
cpplearner opened this issue Feb 26, 2022 · 0 comments · Fixed by #2600
Closed

<format>: Could the output of __std_get_cvt be cached? #2594

cpplearner opened this issue Feb 26, 2022 · 0 comments · Fixed by #2600
Labels
fixed Something works now, yay! format C++20/23 format performance Must go faster

Comments

@cpplearner
Copy link
Contributor

#2493 changed the constructor of _Fmt_codec_base<false> to always call __std_get_cvt with a codepage representing the execution character set (_MSVC_EXECUTION_CHARACTER_SET or 65001). Since the execution character set does not change for the lifetime of a program, could the information be cached?

This would save a lot of calls to GetCPInfoExW when the execution character set is not self-synchronizing.

@StephanTLavavej StephanTLavavej added the performance Must go faster label Mar 1, 2022
@StephanTLavavej StephanTLavavej added the format C++20/23 format label Mar 2, 2022
@StephanTLavavej StephanTLavavej added the fixed Something works now, yay! label Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Something works now, yay! format C++20/23 format performance Must go faster
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants