syzygy wrote: ↑Thu Jun 28, 2018 11:55 pm
The lock is necessary because the main thread and the UI thread can try to print at the same time. For example, if the GUI sends "stop" and "isready" commands in quick succession, the response to isready may interfere with the response to stop (if locking is removed), and the GUI can get confused.
Thanks for the explanation. I won't change the io lock. I also realise the code std::endl flushes the buffer thus we don't need to add any more code for flushing.
If Stockfish's team does not want to surprise new Visual studio's users when they benchmark for their exe files, just add below code to init function of Search class. The code does not affect any OS/compiler except Windows/VS:
Joost Buijs wrote: ↑Fri Jun 29, 2018 7:06 am
Intel being ~2% faster, MSVC is not as bad anymore as it used to be.
From my and someone's experiences here, Stockfish exe compiled by VS is slower than ones by gcc (with Cygwin/MingW) at least 7%. Thus +2% is still significantly slower. I would be so surprised if both Intel compiler and VS are lagging behind gcc.
Could you verify please? Just download Cygwin or MingW and gcc, compile and run benchmark. Thanks
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
Joost Buijs wrote: ↑Fri Jun 29, 2018 7:06 am
Intel being ~2% faster, MSVC is not as bad anymore as it used to be.
From my and someone's experiences here, Stockfish exe compiled by VS is slower than ones by gcc (with Cygwin/MingW) at least 7%. Thus +2% is still significantly slower. I would be so surprised if both Intel compiler and VS are lagging behind gcc.
Could you verify please? Just download Cygwin or MingW and gcc, compile and run benchmark. Thanks
Stockfish is optimized using gcc, so it's quite possible that it will run a bit slower when compiled with Intel or MSVC, these compilers react all differently to certain code constructs.
I ran the benchmark on my i7-6950x at 3800MHz., with PGO I can probably get another 5 or 10% increase in speed, I don't want to install Cygwin or MinGW to compare it with gcc because I think these small differences are not important anyway.