Thanks guys for the help on the perft bug. It took me longer than it should have, but I have now found the cause of the error.
My initial guess was wrong, it wasnt a promotion bug it was an ep bug.
To remove the taken pawn in the ep capture, I was taking the ep square and using that as the location of the pawn. I had missed a line of code to either add or subtract 0x10 to move 1 rank. Despite quite a few asserts dotted around the code, none of them were triggered due to the bug.
r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1
raw:14 end:14 secs:0.00
raw:206 end:192 secs:0.00
raw:3672 end:3466 secs:0.00
raw:63792 end:60120 secs:0.02 nps:3987000
raw:1287576 end:1223784 secs:0.33 nps:3925537
raw:25449546 end:24161970 secs:6.78 nps:3753067
raw:553838205 end:528388659 secs:141.59 nps:3911452
I also improved the time to perft 7 quite a bit, but it still looks very poor against some others quoted. (P4 @3.4 GHz)
I am not really interested in doing any specialist tricks for perft as I was using it to just prove the correctness of my code. My perft is simply, generate moves -> make move -> undo move
I would be interested to compare some more perft 7 times, for engines that use a similar non-specific perft loop. If you do post some more times, please quote CPU speed to make it more meaningful.
Regards Geoff