]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Speculative prefetch
[stockfish] / src / search.cpp
index 152de13c861d6689f803327424c8a419db79b19c..32f42cf07e879777c8b7241fe8a517d65e33f8b2 100644 (file)
@@ -788,6 +788,9 @@ moves_loop: // When in check and at SpNode search starts from here
           }
       }
 
+      // Speculative prefetch
+      prefetch((char*)TT.first_entry(pos.hash_after_move(move)));
+
       // Check for legality just before making the move
       if (!RootNode && !SpNode && !pos.legal(move, ci.pinned))
       {
@@ -1137,6 +1140,9 @@ moves_loop: // When in check and at SpNode search starts from here
           &&  pos.see_sign(move) < VALUE_ZERO)
           continue;
 
+      // Speculative prefetch
+      prefetch((char*)TT.first_entry(pos.hash_after_move(move)));
+
       // Check for legality just before making the move
       if (!pos.legal(move, ci.pinned))
           continue;