Description
llvm-project/libcxx/include/print
Lines 235 to 241 in 2f4328e
In this function the following two lines are not necessary and introduce performance pessimization.
llvm-project/libcxx/include/print
Lines 237 to 238 in 2f4328e
Additionally, if you read the standard carefully http://www.eel.is/c++draft/print.fun#7.sentence-4 It says:
If the native Unicode API is used, the function flushes stream before writing out.
Although POSIX offers a way to query if a C stream goes to terminal or not, it does not have native Unicode API, so such API is never used, and flushing is not needed. A consequence of this is that on POSIX querying the C stream is not needed at all and it is another performance pessimization. The call to __is_terminal()
is not needed here.
llvm-project/libcxx/include/print
Lines 312 to 313 in 2f4328e