New asmFish released

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

Moderators: hgm, Rebel, chrisw

mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: New asmFish released

Post by mar »

Milos wrote:And finally CFish is a nightmare to compile with anything but MinGW.
I have Cfish up and running compiled using VS2015, I only compared the popcnt compile against the official one and Cfish is 9% faster on my machine (even with slower compiler).
I need to sort out some things and then I'll upload the source + project.

Last thing: asmfish doesn't produce the same tree as official SF8 but Cfish does
Also, Cfish produces much smaller binary (~290kb here with static CRT), note that it's about the size of whole C++ runtime I usually get in my programs (minus stuff I don't use and I don't really use much of it).
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Cfish for VS2015

Post by mar »

The link as promised, contains (slightly modified) source + vs2015 project
http://www.crabaware.com/sjaak/Cfish_vs2015.zip
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: New asmFish released

Post by Milos »

mar wrote:
Milos wrote:And finally CFish is a nightmare to compile with anything but MinGW.
I have Cfish up and running compiled using VS2015, I only compared the popcnt compile against the official one and Cfish is 9% faster on my machine (even with slower compiler).
I need to sort out some things and then I'll upload the source + project.

Last thing: asmfish doesn't produce the same tree as official SF8 but Cfish does
Also, Cfish produces much smaller binary (~290kb here with static CRT), note that it's about the size of whole C++ runtime I usually get in my programs (minus stuff I don't use and I don't really use much of it).
You don't use mutexes (actual Ronald doesn't) so you replaced all atomic variables and operations with ints and pointers. Good luck with that working as intended in SMP.
Size of a binary doesn't matter, my VS produces optimized compile of SF (non-PGO compile) to be 360kB.
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: New asmFish released

Post by Milos »

syzygy wrote:
Milos wrote:
syzygy wrote:Ehm, the most invasive change of the "unix version" of brainfish is the insertion of the "author"'s own name, unless you run it on a NUMA machine (for which it seems to use the patch prepared by Mohammed based on - I think - Texel's code).
NUMA patch provides noticeable speed up even on non-NUMA machines. If you tried it you'd know it.
But if you understood it...
The one who doesn't understand windows NUMA implementation in Brainfish is obviously you. There is clearly 10% speed difference between default (SF) and NUMA version of Brainfish everything else being equal on Windows non-NUMA machine. But if you choose to play stupid I can't help you. You have source of both versions, it's trivial to compile it with exactly the same parameters and run bench on non-NUMA machine and check. There are quite a few posts here with results that show big difference (around 10%). So either post reliable data that show there is no difference or shut up.

"In the windows version large pages is off by default,"

Code: Select all

  o&#91;"Large Pages"&#93;           << Option&#40;false, on_large_pages&#41;;
"so any speed increase of brainfish (when not enabling large pages) is due to the better/different compile."
So to paraphrase your own statement, in Cfish large pages are on by default. So all the benefit of Cfish over SF is due to large pages. The rest is just trivial translate that brings virtually nothing. And then you laugh at Brainfish guys for changing the name and in the same time use print_engine_info with 0 argument. How pathetic.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: New asmFish released

Post by mar »

Milos wrote:You don't use mutexes (actual Ronald doesn't) so you replaced all atomic variables and operations with ints and pointers. Good luck with that working as intended in SMP.
If I'm not mistaken volatile in msc has stronger guarantees, so it should be no problem (assuming x86/x64).

From my experience it doesn't matter much if you use mutex/spinlock/atomics, if there's contention false sharing will kill performance either way.

That being said it might be worth it to align/pad variables that can be modified by other threads (i.e. separate thread-control data in position from the rest) to prevent sharing the same cache line.
Of course "if worth" = if there's a measurable improvement.
Size of a binary doesn't matter, my VS produces optimized compile of SF (non-PGO compile) to be 360kB.
Interesting, mine is 520kB (static CRT), but not a big deal.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: New asmFish released

Post by syzygy »

Milos wrote:The one who doesn't understand windows NUMA implementation in Brainfish is obviously you. There is clearly 10% speed difference between default (SF) and NUMA version of Brainfish everything else being equal on Windows non-NUMA machine.
So... now be so kind to explain how a NUMA patch could possibly give 10% more speed on a non-NUMA machine. :roll: :roll:
"In the windows version large pages is off by default,"

Code: Select all

  o&#91;"Large Pages"&#93;           << Option&#40;false, on_large_pages&#41;;
"so any speed increase of brainfish (when not enabling large pages) is due to the better/different compile."
So to paraphrase your own statement, in Cfish large pages are on by default. So all the benefit of Cfish over SF is due to large pages. The rest is just trivial translate that brings virtually nothing.
About 8.5% on Windows without LP (ignoring the 2% I backported to SF). I have only tested on Sandybridge though.
And then you laugh at Brainfish guys for changing the name
I have no right to say anything but YOU do? Heh. What have you ever done... apart from trolling this forum?

Anyway, taking 99.9% of SF code and replacing the names of the authors with your own is a bit questionable, yes. And it may have been the reason that people like you have gotten this strange idea that brainfish contains innovations beyond the Cerebellum book code.
and in the same time use print_engine_info with 0 argument. How pathetic.
Oh wow, you have read a single line in main.c.
I understand now that you are not a programmer at all.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: New asmFish released

Post by shrapnel »

syzygy wrote:
Milos wrote:The one who doesn't understand windows NUMA implementation in Brainfish is obviously you. There is clearly 10% speed difference between default (SF) and NUMA version of Brainfish everything else being equal on Windows non-NUMA machine.
So... now be so kind to explain how a NUMA patch could possibly give 10% more speed on a non-NUMA machine. :roll: :roll:
"In the windows version large pages is off by default,"

Code: Select all

  o&#91;"Large Pages"&#93;           << Option&#40;false, on_large_pages&#41;;
"so any speed increase of brainfish (when not enabling large pages) is due to the better/different compile."
So to paraphrase your own statement, in Cfish large pages are on by default. So all the benefit of Cfish over SF is due to large pages. The rest is just trivial translate that brings virtually nothing.
About 8.5% on Windows without LP (ignoring the 2% I backported to SF). I have only tested on Sandybridge though.
And then you laugh at Brainfish guys for changing the name
I have no right to say anything but YOU do? Heh. What have you ever done... apart from trolling this forum?

Anyway, taking 99.9% of SF code and replacing the names of the authors with your own is a bit questionable, yes. And it may have been the reason that people like you have gotten this strange idea that brainfish contains innovations beyond the Cerebellum book code.
and in the same time use print_engine_info with 0 argument. How pathetic.
Oh wow, you have read a single line in main.c.
I understand now that you are not a programmer at all.
What a horrible, sneering post !
I didn't know this Forum is only meant for Programmers ; News to me.
As if anyone who isn't a Programmer is just plain stupid.
FYI there are other Professions apart from Programming which also require a high degree of Intelligence.
Have you considered that computer chess may just be a Hobby for many people here and we can't spend as much time as we would like on it, as many of us earn a Living through other Professions ?
You call that guy a Troll. People like you actually provoke Trolling.
In fact, its a moot point who really is the Troll here.
I find most of your Posts obnoxious, sneering and condescending.
You may be a brilliant Programmer but your Behavior and Attitude negates that. I feel you're basically not a nice person.
You richly deserve all the Trolling you get, and more.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: New asmFish released

Post by syzygy »

I think you are slightly missing the context...
Rochester
Posts: 55
Joined: Sat Feb 20, 2016 6:11 am

Re: New asmFish released

Post by Rochester »

Your always full of the hate speak. Remember: Jezus loves the Ronald too. Bless you.
APassionForCriminalJustic
Posts: 417
Joined: Sat May 24, 2014 9:16 am

Re: New asmFish released

Post by APassionForCriminalJustic »

shrapnel wrote:
syzygy wrote:
Milos wrote:The one who doesn't understand windows NUMA implementation in Brainfish is obviously you. There is clearly 10% speed difference between default (SF) and NUMA version of Brainfish everything else being equal on Windows non-NUMA machine.
So... now be so kind to explain how a NUMA patch could possibly give 10% more speed on a non-NUMA machine. :roll: :roll:
"In the windows version large pages is off by default,"

Code: Select all

  o&#91;"Large Pages"&#93;           << Option&#40;false, on_large_pages&#41;;
"so any speed increase of brainfish (when not enabling large pages) is due to the better/different compile."
So to paraphrase your own statement, in Cfish large pages are on by default. So all the benefit of Cfish over SF is due to large pages. The rest is just trivial translate that brings virtually nothing.
About 8.5% on Windows without LP (ignoring the 2% I backported to SF). I have only tested on Sandybridge though.
And then you laugh at Brainfish guys for changing the name
I have no right to say anything but YOU do? Heh. What have you ever done... apart from trolling this forum?

Anyway, taking 99.9% of SF code and replacing the names of the authors with your own is a bit questionable, yes. And it may have been the reason that people like you have gotten this strange idea that brainfish contains innovations beyond the Cerebellum book code.
and in the same time use print_engine_info with 0 argument. How pathetic.
Oh wow, you have read a single line in main.c.
I understand now that you are not a programmer at all.
What a horrible, sneering post !
I didn't know this Forum is only meant for Programmers ; News to me.
As if anyone who isn't a Programmer is just plain stupid.
FYI there are other Professions apart from Programming which also require a high degree of Intelligence.
Have you considered that computer chess may just be a Hobby for many people here and we can't spend as much time as we would like on it, as many of us earn a Living through other Professions ?
You call that guy a Troll. People like you actually provoke Trolling.
In fact, its a moot point who really is the Troll here.
I find most of your Posts obnoxious, sneering and condescending.
You may be a brilliant Programmer but your Behavior and Attitude negates that. I feel you're basically not a nice person.
You richly deserve all the Trolling you get, and more.
This is the world of the Internet; people will say and do as they please so long as it does not go too far. From what I've seen Ronald just wants to answer questions. Go chill at the TCEC chat. You will notice that he is a nice guy, and that he is usually always willing to help people or answer your questions. Do not forget that he has serious skills. He is, of course, not only the man behind Cfish - but also behind the Syzygy tablebases. In my opinion, you need to greatly respect that. Ronald's point is basically that Brainfish is nothing more than Stockfish development with the Cerebellum book. Brainfish's implementation of NUMA was actually taken from Mohammed Li (asmFish's author). That NUMA patched failed to show an Elo gain when tested at the Fishtest framework using 32 cores if I am not mistaken. I don't necessarily understand the intricacies surrounding how the NUMA code works. Nonetheless, I will not believe Milos and his argument that Brainfish is the fastest Stockfish. Clearly asmFish is.

And what is with Milo's constant desire to trash other peoples' work? Cfish would DEFINITELY be faster than Brainfish.