]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplifying two formulas
[stockfish] / src / search.cpp
index daab1eb1770c080bb597bf30c063c84788377b78..3cd3b555c4a4506f712c214076ccced287731dd3 100644 (file)
@@ -772,7 +772,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
                 update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
                                               stat_bonus(depth) * bonus);
                 thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)]
-                  << stat_bonus(depth) * bonus * 57 / 100;
+                  << stat_bonus(depth) * bonus / 2;
             }
             return value;
         }
@@ -869,6 +869,9 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
             {
                 assert(pos.capture_stage(move));
 
+                // Prefetch the TT entry for the resulting position
+                prefetch(TT.first_entry(pos.key_after(move)));
+
                 ss->currentMove = move;
                 ss->continuationHistory =
                   &thisThread
@@ -1336,7 +1339,7 @@ moves_loop:  // When in check, search starts here
         update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
                                       stat_bonus(depth) * bonus);
         thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)]
-          << stat_bonus(depth) * bonus * 61 / 100;
+          << stat_bonus(depth) * bonus / 2;
     }
 
     if (PvNode)