]> git.sesse.net Git - stockfish/commitdiff
Revert "Prefetch earlier in qsearch()"
authorJoona Kiiski <joona@zoox.com>
Wed, 21 Jun 2017 20:44:05 +0000 (13:44 -0700)
committerJoona Kiiski <joona@zoox.com>
Wed, 21 Jun 2017 20:45:03 +0000 (13:45 -0700)
This reverts commit b73016bb41d4c2fad3126b2e0018d71a36e78331.

No functional change

Closes #1144

src/search.cpp

index 5447ed3c6694c74b398effebbe3ad41a704e9778..9f4ba00d1b9cd3ea5155ca63dc77564cf8dde335 100644 (file)
@@ -1262,9 +1262,6 @@ moves_loop: // When in check search starts from here
     {
       assert(is_ok(move));
 
-      // Speculative prefetch as early as possible
-      prefetch(TT.first_entry(pos.key_after(move)));
-
       givesCheck =  type_of(move) == NORMAL && !pos.discovered_check_candidates()
                   ? pos.check_squares(type_of(pos.piece_on(from_sq(move)))) & to_sq(move)
                   : pos.gives_check(move);
@@ -1306,6 +1303,9 @@ moves_loop: // When in check search starts from here
           &&  !pos.see_ge(move))
           continue;
 
+      // Speculative prefetch as early as possible
+      prefetch(TT.first_entry(pos.key_after(move)));
+
       // Check for legality just before making the move
       if (!pos.legal(move))
       {