X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=19955a8622e9b8fe825f504e9ccea333a86aec28;hb=5cbcff55cc3a2ff78dd83e7a3f94c5414946f82c;hp=152de13c861d6689f803327424c8a419db79b19c;hpb=a1b62d68ec59aae504a9e39bfd3a7dfa4a831d29;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 152de13c..19955a86 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -33,7 +33,7 @@ #include "timeman.h" #include "thread.h" #include "tt.h" -#include "ucioption.h" +#include "uci.h" namespace Search { @@ -140,8 +140,8 @@ void Search::init() { // Init futility move count array for (d = 0; d < 32; ++d) { - FutilityMoveCounts[0][d] = int(2.4 + 0.222 * pow(d * 2 + 0.00, 1.8)); - FutilityMoveCounts[1][d] = int(3.0 + 0.300 * pow(d * 2 + 0.98, 1.8)); + FutilityMoveCounts[0][d] = int(2.4 + 0.773 * pow(d + 0.00, 1.8)); + FutilityMoveCounts[1][d] = int(2.9 + 1.045 * pow(d + 0.49, 1.8)); } } @@ -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;