// History and stats update bonus, based on depth
int stat_bonus(Depth depth) {
- int d = depth / ONE_PLY ;
+ int d = depth / ONE_PLY;
return d > 17 ? 0 : d * d + 2 * d - 2;
}
{
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);
&& !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))
{