wrong. I've been using GCC on windows for years.dangi12012 wrote: ↑Thu Dec 02, 2021 5:16 pmCFish was just to show what optimisations C CANNOT do? Because people think that C is faster - but with modern C++ you have much more modern compiler backends and features like constexpr/consteval that make code a lot faster because you can make your intentions to the compiler much clearer.
Also the last port is 1 year old so it will be weaker than current stockfish.
But to your question: Yes Clang is the only option - it is the only compiler besides MSVC that supports the Windows ABI.
You can build clang on windows with its own cmake file and you get native windows binaries of clang-64.exe that you can use like you would in linux.
It will compile a stockfish.exe.
IMO just try that with stockfish? I dont know what you have to gain by using Cfish.
Cfish for Windows possible ?
Moderator: Ras
-
- Posts: 391
- Joined: Tue Oct 08, 2019 11:39 pm
- Full name: Tomasz Sobczyk
Re: Cfish for Windows possible ?
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.
Maybe you copied your stockfish commits from someone else too?
I will look into that.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
You mean you are using "gcc" on windows for years. Please look up what library it links against - and i garuantee you that its not the one you think. The people here... So much half knowledge.Sopel wrote: ↑Thu Dec 02, 2021 9:10 pmwrong. I've been using GCC on windows for years.dangi12012 wrote: ↑Thu Dec 02, 2021 5:16 pmCFish was just to show what optimisations C CANNOT do? Because people think that C is faster - but with modern C++ you have much more modern compiler backends and features like constexpr/consteval that make code a lot faster because you can make your intentions to the compiler much clearer.
Also the last port is 1 year old so it will be weaker than current stockfish.
But to your question: Yes Clang is the only option - it is the only compiler besides MSVC that supports the Windows ABI.
You can build clang on windows with its own cmake file and you get native windows binaries of clang-64.exe that you can use like you would in linux.
It will compile a stockfish.exe.
IMO just try that with stockfish? I dont know what you have to gain by using Cfish.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
First:AndrewGrant wrote: ↑Thu Dec 02, 2021 7:12 pm Are you able to demonstrate that this claim is true? That GCC out performs CLANG due to native issues?
And the claim that C++ is faster than C is totally bunk, and requires some proof in this case lol.
Yes i can do that in one simple homework for you:
Compile Stockfish with CLANG on windows
Compile Stockfish with gcc on windows with cygwin
Compare NPS
Second:
What do you mean? Its not a claim.
First of all and no point beyond that is needed:
C has not templates and that feature alone makes so much code go away during compilation. You as a programmer do not write you 4096 different functions by hand for every parameter even if you claim now that you do...
C has no consteval keyword that forces the compiler to make an expression a compiletime constant (or forceably inlinable function)
C only has the inline keyword which C++ has also and which is only a hint to the compiler.
There are many keywords like "maybe_unused" or [[likely]] that do help the compiler remove elements or reorder if statements and that is standard compliant PORTABLE code and not some random compiler extension.
And after that you can go and read it yourself and think in your head: What has performance implications and is not available in C?
https://en.cppreference.com/w/cpp/language
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 391
- Joined: Tue Oct 08, 2019 11:39 pm
- Full name: Tomasz Sobczyk
Re: Cfish for Windows possible ?
Who cares what it links against? Works on windows? Yes. Case closed.dangi12012 wrote: ↑Thu Dec 02, 2021 9:31 pmYou mean you are using "gcc" on windows for years. Please look up what library it links against - and i garuantee you that its not the one you think. The people here... So much half knowledge.Sopel wrote: ↑Thu Dec 02, 2021 9:10 pmwrong. I've been using GCC on windows for years.dangi12012 wrote: ↑Thu Dec 02, 2021 5:16 pmCFish was just to show what optimisations C CANNOT do? Because people think that C is faster - but with modern C++ you have much more modern compiler backends and features like constexpr/consteval that make code a lot faster because you can make your intentions to the compiler much clearer.
Also the last port is 1 year old so it will be weaker than current stockfish.
But to your question: Yes Clang is the only option - it is the only compiler besides MSVC that supports the Windows ABI.
You can build clang on windows with its own cmake file and you get native windows binaries of clang-64.exe that you can use like you would in linux.
It will compile a stockfish.exe.
IMO just try that with stockfish? I dont know what you have to gain by using Cfish.
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.
Maybe you copied your stockfish commits from someone else too?
I will look into that.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
Well some people care about performance but you definitively dont. You claim your gcc runs natively in windows and you dont even know that you are linking against a posix translation layer.Sopel wrote: ↑Thu Dec 02, 2021 9:51 pmWho cares what it links against? Works on windows? Yes. Case closed.dangi12012 wrote: ↑Thu Dec 02, 2021 9:31 pmYou mean you are using "gcc" on windows for years. Please look up what library it links against - and i garuantee you that its not the one you think. The people here... So much half knowledge.Sopel wrote: ↑Thu Dec 02, 2021 9:10 pmwrong. I've been using GCC on windows for years.dangi12012 wrote: ↑Thu Dec 02, 2021 5:16 pmCFish was just to show what optimisations C CANNOT do? Because people think that C is faster - but with modern C++ you have much more modern compiler backends and features like constexpr/consteval that make code a lot faster because you can make your intentions to the compiler much clearer.
Also the last port is 1 year old so it will be weaker than current stockfish.
But to your question: Yes Clang is the only option - it is the only compiler besides MSVC that supports the Windows ABI.
You can build clang on windows with its own cmake file and you get native windows binaries of clang-64.exe that you can use like you would in linux.
It will compile a stockfish.exe.
IMO just try that with stockfish? I dont know what you have to gain by using Cfish.
Why would you even do that? With WSL you have a native linux kernel in accessible all the time anyways which is much closer to 100% than your garbage idea to use gcc in windows.
Some people....
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 1957
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Cfish for Windows possible ?
So is CFish faster than C++ Stockfish because Stockfish devs are unaware of how to write the language to the degree of competence you can, or because Ronald is a genius?dangi12012 wrote: ↑Thu Dec 02, 2021 9:46 pmFirst:AndrewGrant wrote: ↑Thu Dec 02, 2021 7:12 pm Are you able to demonstrate that this claim is true? That GCC out performs CLANG due to native issues?
And the claim that C++ is faster than C is totally bunk, and requires some proof in this case lol.
Yes i can do that in one simple homework for you:
Compile Stockfish with CLANG on windows
Compile Stockfish with gcc on windows with cygwin
Compare NPS
Second:
What do you mean? Its not a claim.
First of all and no point beyond that is needed:
C has not templates and that feature alone makes so much code go away during compilation. You as a programmer do not write you 4096 different functions by hand for every parameter even if you claim now that you do...
C has no consteval keyword that forces the compiler to make an expression a compiletime constant (or forceably inlinable function)
C only has the inline keyword which C++ has also and which is only a hint to the compiler.
There are many keywords like "maybe_unused" or [[likely]] that do help the compiler remove elements or reorder if statements and that is standard compliant PORTABLE code and not some random compiler extension.
And after that you can go and read it yourself and think in your head: What has performance implications and is not available in C?
https://en.cppreference.com/w/cpp/language
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
CFish repo translation is over one year old - so any "conclusions" you might draw are useless because it is not the current state of the software.AndrewGrant wrote: ↑Thu Dec 02, 2021 11:04 pm So is CFish faster than C++ Stockfish because Stockfish devs are unaware of how to write the language to the degree of competence you can, or because Ronald is a genius?
Why would a C program be faster than the corresponding C++ program?
It wouldnt be unless you strip out and optimize the code - like they did for CFish.
https://github.com/syzygy1/Cfish/network
Were you too lazy to look that up?
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 391
- Joined: Tue Oct 08, 2019 11:39 pm
- Full name: Tomasz Sobczyk
Re: Cfish for Windows possible ?
OK AND? It doesn't affect performance.dangi12012 wrote: ↑Thu Dec 02, 2021 9:54 pmYou claim your gcc runs natively in windows and you dont even know that you are linking against a posix translation layer.Sopel wrote: ↑Thu Dec 02, 2021 9:51 pmWho cares what it links against? Works on windows? Yes. Case closed.dangi12012 wrote: ↑Thu Dec 02, 2021 9:31 pmYou mean you are using "gcc" on windows for years. Please look up what library it links against - and i garuantee you that its not the one you think. The people here... So much half knowledge.Sopel wrote: ↑Thu Dec 02, 2021 9:10 pmwrong. I've been using GCC on windows for years.dangi12012 wrote: ↑Thu Dec 02, 2021 5:16 pmCFish was just to show what optimisations C CANNOT do? Because people think that C is faster - but with modern C++ you have much more modern compiler backends and features like constexpr/consteval that make code a lot faster because you can make your intentions to the compiler much clearer.
Also the last port is 1 year old so it will be weaker than current stockfish.
But to your question: Yes Clang is the only option - it is the only compiler besides MSVC that supports the Windows ABI.
You can build clang on windows with its own cmake file and you get native windows binaries of clang-64.exe that you can use like you would in linux.
It will compile a stockfish.exe.
IMO just try that with stockfish? I dont know what you have to gain by using Cfish.
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.
Maybe you copied your stockfish commits from someone else too?
I will look into that.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
I feel second hand embarrassment... or Fremdschämen now.
Cygwin is not as fast as a native linux program. Who would have thought? Apperently not you. You think that having a translation layer is free.
But to not make you embarrased more: Its only when system calls are involved. You know like getting time - opening a file WRITING TO THE CONSOLE etc.. only that part is slower.
https://softwareengineering.stackexchan ... n%20Linux).
To make this interesting for other people here: Calls that dont exist in windows had to be supported very creatively. Like the good description by actual experts under "Process Creation" found here:
https://cygwin.com/cygwin-ug-net/highlights.html
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 1957
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Cfish for Windows possible ?
Cfish when up to date with Stockfish has always been faster by 10% to 15%.dangi12012 wrote: ↑Thu Dec 02, 2021 11:20 pmCFish repo translation is over one year old - so any "conclusions" you might draw are useless because it is not the current state of the software.AndrewGrant wrote: ↑Thu Dec 02, 2021 11:04 pm So is CFish faster than C++ Stockfish because Stockfish devs are unaware of how to write the language to the degree of competence you can, or because Ronald is a genius?
Why would a C program be faster than the corresponding C++ program?
It wouldnt be unless you strip out and optimize the code - like they did for CFish.
https://github.com/syzygy1/Cfish/network
Were you too lazy to look that up?
In light of your ability to demonstrate something to counter this, I will stand by the collective belief most hold.
Since you've thrown an insult, I find it a good time to point out that your movegen thing is not even close to the fastest thing out there. There are PEFFT programs that beat what you have done, using bitboards, by orders of magnitude.