-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<iostream>: Bad performance of wcout operator<< compared to wprintf #605
Comments
link to an old article: |
with this call it becomes fast: Why is the default so bad? |
As mentioned in my decade-old reply to that Connect bug you found, this is a CRT limitation:
We changed the iostreams code in that decade - now, Lines 634 to 636 in 280347a
I'll leave this issue active for further investigation; it may be possible to extend this optimization to |
If I compile the following code:
it needs round about 18 milliseconds during runtime.
But if I use C functions like:
It needs only 5 milliseconds!
Why is std::cout / wcout so slow? I would assume that the C function should be slower because it has to analyze the format string, but...
I tried to optimize it by calling first: std::ios::sync_with_stdio(false);
But this seems to be completely ignored (I found no reference to _Sync...)?
The text was updated successfully, but these errors were encountered: