From: Marco Costalba Date: Sat, 26 Apr 2014 22:25:18 +0000 (+0200) Subject: Speed up by almost 3% X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=cb4ac4221e8a178294c084670eff3fa0414135a8;hp=55604f156b2293e870984c6bb57c1954ad5a9517 Speed up by almost 3% This apparentely silly tweak allows to speed up the bench by almost 3%. Not clear why, repeating with perft, the speed up vanishes. Suggested by Jonathan Calovski. No functional change. --- diff --git a/src/position.cpp b/src/position.cpp index 7b345fd9..6b05c24b 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -821,7 +821,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI k ^= Zobrist::enpassant[file_of(st->epSquare)]; } - if (type_of(m) == PROMOTION) + else if (type_of(m) == PROMOTION) { PieceType promotion = promotion_type(m);