Well, that is amazing, I've never seen such big differences. Your engine must be very heavily optimized for use with GCC, or there is something else going on. Each compiler reacts differently to certain constructs, but the differences I usually see are in the order of at most 7%.Sven wrote: ↑Wed Oct 03, 2018 2:32 pmFor my engine Jumbo GCC (even in older versions) has always created around 30-40% faster code than VS (even with VS2017 community). I talk about the 64-bit build of Jumbo's bitboard variant.Joost Buijs wrote: ↑Wed Oct 03, 2018 9:15 amWith VS I usually get the best result when I enable AVX2 code generation, which most CPUs support nowadays, another thing is to disable the 'Security Check' in the generated code which also gains a few percent in speed. I'm totally happy with VS, it compiles very fast especially when you enable MP compilation, totally rebuilding my engine with VS takes about 5 sec. on my 10 core PC, and that is with the project on an old hard drive, on a SSD it will compile even faster.odomobo wrote: ↑Wed Oct 03, 2018 6:48 amIn my experience, if you build in release mode for x64 (if you have a 64-bit processor) will get you a pretty optimal build. I'm lucky if tweaking the settings from there will give me any performance improvement. By default, it enables some pretty aggressive optimizations, including link-time optimization.
It is possible that GCC generates somewhat faster code, but the difference is so small that it is negligible in practice, in my opinion GCC is rather cumbersome to use, especially on Windows, for development I would go for VS any day.
But I agree strange things can happen, when I run Perft with my engine the Intel compiler does this 30% faster than MSVC, the engine overall runs faster with MSVC. I think this is due to cache effects, maybe the code generated by MSVC is larger and doesn't fit in the cache that well, otherwise I can't explain this.