zullil wrote:Yours is much faster, but mine agrees:
By a far amount considering I was using a Raspberry Pi...
Serious mode ON:
is speed of perft really that important? I don't think so, even if I tried to write it performance-wise. And how are we comparing speeds? We need to run the software on the same hardware, and even if I have a core i7 mobile @2.4GHz I don't have idea on what hardware you ran your perft...
And also consider that one year ago (when I [re]wrote my movegen/make/unmake) I really wanted it to be bug free. So instead of optimizing more and more the code to obtain raw perft speeds (eg full legal movegen), with a real chess engine in mind I preferred the SMP approach on the perft. That gave me around a 5x (from my memories) speed boost at once (I have a 8 core, 4 threads+HT), allowing me to test it faster. Also consider "this" perft version doesn't do any incremental updates in make/unmake.
In total I have three perft functions:
(1) Basic perft with gen/make/unmake (this one)
(2) Perft with full make/unmake (so hash update, PST etc...) which runs at about half speed of (1)
(3) Perft with staged move generator inside (that is hash update in make/unmake, plus the generation of moves goes through the state machine used inside search) which runs at about half speed of (2)
For each I have the corresponding SMP implementation.
Everything together allowed me to test gen/make/unmake with different degrees of precision (and speed...)