Cfish for Windows possible ?
Moderator: Ras
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
Post removed as it quoted another user but altered the quoted post. This is not allowed
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Cfish for Windows possible ?
No, he didn't. As I mentioned already, you just fail to understand the argument.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 544
- Joined: Sun Sep 06, 2020 4:40 am
- Full name: Connor McMonigle
Re: Cfish for Windows possible ?
Editing someone's message is a charter violation and will result in a ban. This is not what I wrote.dangi12012 wrote: ↑Sun Dec 05, 2021 3:15 am This speaks for itself:This guy actually claimed that sorting algos are O(1) and wants to tell other people in this forum how to do chessprogramming.connor_mcmonigle wrote: ↑Sun Dec 05, 2021 2:09 am Let P be a set of numbers. Observe that ||P|| is finite.
Let M be some sorting program defined on input P with finite runtime for all P.
Observe that there exists some constant T = max run time of M on P.
Therefore, all sorting algorithms with finite runtime for all P are constant time (M \in O(1)) as any sorting algorithm runtime can be upperbounded by some constant T.
Here's what I actually wrote:
Note that this doesn't work for sorting algorithms as the set of inputs is not finite so no upper bound can established.Let P be the set of legal chess positions. Observe that ||P|| is finite.
Let M be some legal move generator program defined on input of P with finite runtime for all x \in P.
Observe that there exists some constant T = max runtime of M on P.
Therefore, all move generators with finite runtime for all P are constant time (M \in O(1)) as any move generator's runtime can be upperbounded by some constant T.
-
- Posts: 1957
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Cfish for Windows possible ?
connor_mcmonigle wrote: ↑Sun Dec 05, 2021 3:24 amEditing someone's message is a charter violation and will result in a ban. This is not what I wrote.dangi12012 wrote: ↑Sun Dec 05, 2021 3:15 am This speaks for itself:This guy actually claimed that sorting algos are O(1) and wants to tell other people in this forum how to do chessprogramming.connor_mcmonigle wrote: ↑Sun Dec 05, 2021 2:09 am Let P be a set of numbers. Observe that ||P|| is finite.
Let M be some sorting program defined on input P with finite runtime for all P.
Observe that there exists some constant T = max run time of M on P.
Therefore, all sorting algorithms with finite runtime for all P are constant time (M \in O(1)) as any sorting algorithm runtime can be upperbounded by some constant T.
Here's what I actually wrote:
Note that this doesn't work for sorting algorithms as the set of inputs is not finite so no upper bound can established.Let P be the set of legal chess positions. Observe that ||P|| is finite.
Let M be some legal move generator program defined on input of P with finite runtime for all x \in P.
Observe that there exists some constant T = max runtime of M on P.
Therefore, all move generators with finite runtime for all P are constant time (M \in O(1)) as any move generator's runtime can be upperbounded by some constant T.






-
- Posts: 544
- Joined: Sun Sep 06, 2020 4:40 am
- Full name: Connor McMonigle
Re: Cfish for Windows possible ?
1.dangi12012 wrote: ↑Sun Dec 05, 2021 3:01 amNope I claimed that Cygwin does not target the winapi directly which is correct. I claimed pass by reference has performance implications which is correct. Please look it up. C++ didnt invent this for fun. You are not informed at all....connor_mcmonigle wrote: ↑Sun Dec 05, 2021 2:09 amYou've wrongly claimed that there was no version of GCC targeting Windows APIs natively. You've wrongly claimed that pass by reference outperforms pass by pointer. You've wrongly claimed that C compilers can't do constant propagation for constant arrays. You've wrongly claimed that move generators are O(n) (where n must always be less than or equal 64? lol) and that you've discovered a new O(1) algorithm betraying a fundamental misunderstanding of complexity analysis.
Meanwhile, I've claimed that modern C++ features aren't practically relevant to chess engine performance (subjective) and that move generators are all inherently O(1) (which is trivially true as the set of inputs on which move generators are defined has finite cardinality).
:/
At no point I claimed that C compilers cannot do constant folding (WTF?)???
You cannot twist my comments like that. I would like a moderator to delete your comment this is beyond ridiculous trolling. Willfully misinterpreting correct statements. You just pretend I said the opposite to fit your agenda...
You are the one who is claiming that sorting algorithms are O(1) when sorting a limited set. Totally wrong. Your comments are the equivalent of a child throwing a tantrum in the supermarket because you are embarassed that you do not know what N means in the O notation. You even called it "Oh" notation.... because you didnt even know how to spell it correctly 1 hour ago.
Sorry but I wont respond to your troll attempts anymore. Not here or in other threads. I will however defend myself if you make up stuff.
2.
3.
4.
I guess everyone's free to read your comments for themselves and see if they find my descriptions of your claims faithful. I would never intentionally misrepresent what someone has said.
-
- Posts: 382
- Joined: Thu Jun 05, 2014 2:14 pm
- Location: Iran
- Full name: Mehdi Amini
Re: Cfish for Windows possible ?
I was able to compile Cfish via MSYS2 mingw64. The strange observation is:AndrewGrant wrote: ↑Sat Dec 04, 2021 8:30 pmYes, ./Cfish.exe bench worked just fine.Look wrote: ↑Sat Dec 04, 2021 9:07 amBy the way , would bench work for you ?AndrewGrant wrote: ↑Thu Dec 02, 2021 5:10 pm I as able to build perfectly fine on windows in my first attempt -- "make build ARCH=x86-64-modern"
I believe it is important that you have a POSIX version of gcc, for pthread reasons.Code: Select all
$ gcc --version gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code: Select all
=========================== Total time (ms) : 2017 Nodes searched : 4749514 Nodes/second : 2354741
- On windows 7: bench speed roughly 800 knps
- On Linux virtual box same PC: bench speed roughly 1.6 mnps
Farewell.
-
- Posts: 391
- Joined: Tue Oct 08, 2019 11:39 pm
- Full name: Tomasz Sobczyk
Re: Cfish for Windows possible ?
References were added to support operator overloading in a sane way. You're full of shit. https://www.stroustrup.com/bs_faq2.html ... referencesdangi12012 wrote: ↑Sun Dec 05, 2021 3:01 am I claimed pass by reference has performance implications which is correct. Please look it up. C++ didnt invent this for fun. You are not informed at all....
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: 2655
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Cfish for Windows possible ?
if the compiler can see the body of the function and decides to inline it, then passing by reference has no perf implications at all,dangi12012 wrote: ↑Sun Dec 05, 2021 3:01 am I claimed pass by reference has performance implications which is correct. Please look it up. C++ didnt invent this for fun. You are not informed at all....
the optimizer decides whether it's beneficial to actually pass by reference or by value
you seem to misunderstand the difference between constant folding and constant propagationAt no point I claimed that C compilers cannot do constant folding (WTF?)???
by the way, since the compilers share the codegen backend for both C and C++, the idea that C++ should be slower than C is wrong,
unless you do crazy things like using std::vector inside search for storing moves
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Cfish for Windows possible ?
Thank you. People here say CFish is faster than SF. so C++ is slower than C which is incorrect. Yes they share the same backend but inline is just a hint and consteval is 100% forced compiletime!mar wrote: ↑Sun Dec 05, 2021 12:13 pmif the compiler can see the body of the function and decides to inline it, then passing by reference has no perf implications at all,dangi12012 wrote: ↑Sun Dec 05, 2021 3:01 am I claimed pass by reference has performance implications which is correct. Please look it up. C++ didnt invent this for fun. You are not informed at all....
the optimizer decides whether it's beneficial to actually pass by reference or by value
you seem to misunderstand the difference between constant folding and constant propagationAt no point I claimed that C compilers cannot do constant folding (WTF?)???
by the way, since the compilers share the codegen backend for both C and C++, the idea that C++ should be slower than C is wrong,
unless you do crazy things like using std::vector inside search for storing moves
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 7299
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Cfish for Windows possible ?
What other conclusion is there?dangi12012 wrote: ↑Sun Dec 05, 2021 2:26 pm People here say CFish is faster than SF. so C++ is slower than C which is incorrect.
This is Stockfish 12 - avx2
Code: Select all
info depth 25 seldepth 31 multipv 1 score cp 24 nodes 8616999 nps 411548 hashfull 1000 tbhits 0 time 20938 pv d2d4 g8f6 c2c4 e7e6 g1f3 d7d5 b1c3 d5c4 e2e3 a7a6 f1c4 b7b5 c4b3 c8b7 e1g1 f8e7 f1e1 c7c5 e3e4 c5d4 f3d4 e7c5 d4e6 f7e6
bestmove d2d4 ponder g8f6
Code: Select all
info depth 25 seldepth 31 multipv 1 score cp 24 nodes 8616999 nps 587749 hashfull 1000 tbhits 0 time 14661 pv d2d4 g8f6 c2c4 e7e6 g1f3 d7d5 b1c3 d5c4 e2e3 a7a6 f1c4 b7b5 c4b3 c8b7 e1g1 f8e7 f1e1 c7c5 e3e4 c5d4 f3d4 e7c5 d4e6 f7e6
bestmove d2d4 ponder g8f6
SF12 NPS = 411.548
Cfish NPS = 587.749
90% of coding is debugging, the other 10% is writing bugs.