]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Prefetch also material tables
[stockfish] / src / position.cpp
index f4a098d988d4e1a868d36b110b77c44d195204ff..abe7fde3226692ad6fc1f0d376f0518c2d9cfb4a 100644 (file)
@@ -885,7 +885,6 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
 
       // Update pawn hash key and prefetch in L1/L2 cache
       st->pawnKey ^= zobrist[us][PAWN][from] ^ zobrist[us][PAWN][to];
-      prefetchPawn(st->pawnKey, threadID);
 
       // Set en passant square, only if moved pawn can be captured
       if ((to ^ from) == 16)
@@ -938,6 +937,9 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
       }
   }
 
+  // Prefetch pawn and material hash tables
+  prefetchTables(st->pawnKey, st->materialKey, threadID);
+
   // Update incremental scores
   st->value += pst_delta(piece, from, to);