1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

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 <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2012-03-12 15:21:54 +01:00
parent 3dccdf5b83
commit 9934b8ec31

View file

@ -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)