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:
parent
3dccdf5b83
commit
9934b8ec31
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue