C++'s std::endl
flushes the stream, python's print
does not. Try using "\n"
, that should speed up the C++ code.
↧
Answer by Doncho Gunchev for c++ execution time is slower than python's
↧
C++'s std::endl
flushes the stream, python's print
does not. Try using "\n"
, that should speed up the C++ code.