]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Reformat and rename hash_after_move()
[stockfish] / src / search.cpp
index 152de13c861d6689f803327424c8a419db79b19c..5b56af58051de0e8eff643260468c099f917f650 100644 (file)
@@ -788,6 +788,9 @@ moves_loop: // When in check and at SpNode search starts from here
           }
       }
 
+      // Speculative prefetch as early as possible
+      prefetch((char*)TT.first_entry(pos.key_after(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 as early as possible
+      prefetch((char*)TT.first_entry(pos.key_after(move)));
+
       // Check for legality just before making the move
       if (!pos.legal(move, ci.pinned))
           continue;