mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08: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:
@@ -43,6 +43,11 @@ int main(int argc, char* argv[]) {
|
|||||||
Eval::init();
|
Eval::init();
|
||||||
TT.set_size(Options["Hash"]);
|
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;
|
cout << engine_info() << endl;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user