Aren't you measuring a lot more than make/unmake with those numbers? Here is my perft function without 'bulk counting':Rein Halbersma wrote:You can very easily compute the timings for Move Generation and Make/Unmake by comparing the results of bulk and no-bulk counting. The difference between e.g. perft(11,BULK=1) and perft(11,BULK=0) on the initial position is 1665861398 pairs of Make/Unmake calls. Then you need also the timings for ply=10 for both and then you can deduce the timings for a move_generate() call as well.
Code: Select all
INT64 Perft(BOARD *board, int color, int depth)
{
MOVELIST movelist;
int n_moves, i;
INT64 nodes;
if (depth == 0)
return(1);
n_moves = build_movelist(board, color, &movelist);
nodes = 0;
for (i = 0; i < n_moves; ++i)
nodes += Perft(movelist.board + i, color ^ 1, depth - 1);
return(nodes);
}
-- Ed