Cfish 9 is OUT!

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
syzygy
Posts: 4458
Joined: Tue Feb 28, 2012 10:56 pm

Re: Cfish 9 is OUT!

Post by syzygy » Wed Jan 31, 2018 10:03 pm

I have recompiled the binaries with -flto. Not much faster on my system, but maybe it helps on other systems.

Same link: https://github.com/syzygy1/Cfish/releases/tag/cfish_9

Thomas Zipproth
Posts: 56
Joined: Sat Jan 01, 2011 4:33 pm

Re: Cfish 9 is OUT!

Post by Thomas Zipproth » Wed Jan 31, 2018 10:09 pm

syzygy wrote:
Thomas Zipproth wrote:I compared the speed of cfish_9_x64_modern_windows.exe
provided in
https://github.com/syzygy1/Cfish/releases/tag/cfish_9

with the speed of stockfish_9_x64_popcnt.exe
provided in my contribution candidates for the official Stockfish release:
www.zipproth.de/Brainfish/SF9_Windows.zip

Surprisingly, the Stockfish compile seems to be clearly faster.
I never did this comparison till now and expected CFish to be faster, perhaps someone can cross check this.
On Linux/Wine on my Sandy Bridge i7-3930K, the Cfish binary is faster.

On Linux/Wine on my Kaby Lake i7-7560U laptop, Cfish is again faster. Same for the bmi2 versions.

How are you measuring? Default bench?
Yes, Default bench, here are the results:


Core I7 4790k Haswell 4GHz Windows7:

cfish_9_x64_bmi2_windows.exe:
===========================
Total time (ms) : 1873
Nodes searched : 5023629
Nodes/second : 2682129

stockfish_9_x64_bmi2.exe
===========================
Total time (ms) : 1815
Nodes searched : 5023629
Nodes/second : 2767839


Core I7 3770k 3.5GHz Sandy Bridge Windows 7:

cfish_9_x64_modern_windows.exe
===========================
Total time (ms) : 2466
Nodes searched : 5023629
Nodes/second : 2037156

stockfish_9_x64_popcnt.exe
===========================
Total time (ms) : 2295
Nodes searched : 5023629
Nodes/second : 2188945

syzygy
Posts: 4458
Joined: Tue Feb 28, 2012 10:56 pm

Re: Cfish 9 is OUT!

Post by syzygy » Wed Jan 31, 2018 11:07 pm

On my old Sandy Bridge laptop with Windows 10:

stockfish_9_x64_popcnt.exe: 1737077 nodes/second
cfish_9_x64_modern_windows.exe: 1805761 nodes/second

Compiled with gcc-7.2.0 (and without -mnative to avoid unwanted dependencies).

Interestingly, Cfish compiled on my old Windows laptop (with gcc-6.2.0) achieves 1879397 nodes/second.

Thomas Zipproth
Posts: 56
Joined: Sat Jan 01, 2011 4:33 pm

Re: Cfish 9 is OUT!

Post by Thomas Zipproth » Wed Jan 31, 2018 11:37 pm

At the moment I have no idea what effect can cause this differences.
The compiles are made with the default stockfish makefile and mingw 7.2.0.

I measured the speed on the same system where i made the compile.
Maybe the profile run delivers more system specific results than I thought, but that would be contrary to what I experienced till now.
I will make some tests on different computers tomorrow, perhaps additional tests from other users will reveal the reason.

Andre
Posts: 93
Joined: Thu Jul 23, 2009 3:40 am

Re: Cfish 9 is OUT!

Post by Andre » Wed Jan 31, 2018 11:51 pm

syzygy wrote:
Andre wrote:Do you know if we can build one for MacOS?
I just tried running "make build ARCH=x86-64-modern" (like I do for the master Stockfish) but I'm getting:
You could try "make build ARCH=x86-64-modern numa=no".
Thanks Ronald. That worked!

syzygy
Posts: 4458
Joined: Tue Feb 28, 2012 10:56 pm

Re: Cfish 9 is OUT!

Post by syzygy » Thu Feb 01, 2018 12:24 am

Thomas Zipproth wrote:At the moment I have no idea what effect can cause this differences.
The compiles are made with the default stockfish makefile and mingw 7.2.0.
So the same version as I have been using, except that I am cross-compiling on Linux for Windows.
I measured the speed on the same system where i made the compile.
Maybe the profile run delivers more system specific results than I thought, but that would be contrary to what I experienced till now.
That would also be contrary to how gcc profiling works. It just counts branches taken, not cache misses etc. In my understanding it should in principle be possible to collect the profile statistics on an ARM machine and not notice a difference.

pferd
Posts: 122
Joined: Thu Jul 24, 2014 12:49 pm

Re: Cfish 9 is OUT!

Post by pferd » Thu Feb 01, 2018 1:02 am

I have been doing a couple of compiles with both Stockfish and Cfish over the past days. I used Ubuntu 18.04 for cross-compilation of the Windows binaries.

Sf9 vs Cfish9 on Windows:

I got similar results as Thomas with a slight edge in favor of Stockfish

On Linux:

Cfish kept a clear edge when using gcc and -march=native -mtune=native for both.

But using a recent development version of clang 6.0 with -march=native -mtune=native and -flto gave not only the fastest binaries but it also almost completely nullified the advantage of cfish on my machine (i7 4770)

Looking forward for Rustfish :D

MikeB
Posts: 3559
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Cfish 9 is OUT!

Post by MikeB » Thu Feb 01, 2018 1:50 am

zullil wrote:and it's 15% faster than SF 9 (your mileage may vary)! And that's just for one thread. Even better with many threads on NUMA systems.

https://github.com/syzygy1/Cfish

Looks like you'll need to compile for yourself.

Hoping Mohammed returns to provide us with Asmfish 9 ...
Thanks Ronald for the speedy update , will provide some macOS binaries soon.

MikeB
Posts: 3559
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Cfish 9 is OUT!

Post by MikeB » Thu Feb 01, 2018 3:50 am

MikeB wrote:
zullil wrote:and it's 15% faster than SF 9 (your mileage may vary)! And that's just for one thread. Even better with many threads on NUMA systems.

https://github.com/syzygy1/Cfish

Looks like you'll need to compile for yourself.

Hoping Mohammed returns to provide us with Asmfish 9 ...
Thanks Ronald for the speedy update , will provide some macOS binaries soon.
Here are some macOS binaries, let me know if you will host ( or just place on Github as as part of a release) and I will take down the dropbox link.

https://www.dropbox.com/s/b2w70inqssr03 ... S.zip?dl=1
source: https://github.com/syzygy1/Cfish/tree/f ... cca73a6756

syzygy
Posts: 4458
Joined: Tue Feb 28, 2012 10:56 pm

Re: Cfish 9 is OUT!

Post by syzygy » Thu Feb 01, 2018 7:59 am

MikeB wrote:
MikeB wrote:
zullil wrote:and it's 15% faster than SF 9 (your mileage may vary)! And that's just for one thread. Even better with many threads on NUMA systems.

https://github.com/syzygy1/Cfish

Looks like you'll need to compile for yourself.

Hoping Mohammed returns to provide us with Asmfish 9 ...
Thanks Ronald for the speedy update , will provide some macOS binaries soon.
Here are some macOS binaries, let me know if you will host ( or just place on Github as as part of a release) and I will take down the dropbox link.

https://www.dropbox.com/s/b2w70inqssr03 ... S.zip?dl=1
source: https://github.com/syzygy1/Cfish/tree/f ... cca73a6756
Thanks, I'll add them to the github release page (but it'll have to wait until later today).

Post Reply