From: Marco Costalba Date: Mon, 12 Mar 2012 14:21:54 +0000 (+0100) Subject: Don't sync with C library I/O buffers X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=9934b8ec31483ceb98c19dfe4fface14fe384b32 Don't sync with C library I/O buffers Now we are forced to just use C++ iostream becuase buffers are independent and using C library functions like printf() or scanf() could yield to issues. Speed up of about 1%. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/main.cpp b/src/main.cpp index 0c94ed89..1b2fdf9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,6 +43,11 @@ int main(int argc, char* argv[]) { Eval::init(); TT.set_size(Options["Hash"]); + // Don't sync with C library I/O buffers, faster but now using printf() + // or scanf() could yield to issues because buffers are independent. + cout.sync_with_stdio(false); + cin.sync_with_stdio(false); + cout << engine_info() << endl; if (argc == 1)