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

Optimize println() overloads added in P3142R0 #4672

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #4630.

  • Add a function __std_print_newline_only_to_unicode_console to the import library to avoid potential branches around WriteConsoleW.
  • Use sputc for non-Unicode new line printing for ostream to reduce potential branches.
  • Use fputc for non-Unicode new line printing for FILE* as the function seems to be the simplest for the purpose in UCRT.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner May 12, 2024 08:04
@StephanTLavavej StephanTLavavej added the performance Must go faster label May 12, 2024
@StephanTLavavej StephanTLavavej self-assigned this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
Status: Initial Review
Development

Successfully merging this pull request may close these issues.

Optimize P3142R0 Printing Blank Lines With println()
2 participants