X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=a16fceb1351f3a9bda4f7c8619f2201ae9d301ad;hp=1317fc239ddc46c22f89167b2516f645ed33aa13;hb=8a9b9ec96a3bf04366dbac710d7019d081922186;hpb=222f59b9c1537f22db65c6104072f5e0f68c1fbc diff --git a/src/search.cpp b/src/search.cpp index 1317fc23..a16fceb1 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -126,6 +126,7 @@ void Search::init() { { double pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00; double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25; + Reductions[1][1][hd][mc] = int8_t( pvRed >= 1.0 ? pvRed + 0.5: 0); Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed + 0.5: 0); @@ -139,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)); } } @@ -787,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)) { @@ -1136,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;