]> git.sesse.net Git - stockfish/commitdiff
Speed up by almost 3%
authorMarco Costalba <mcostalba@gmail.com>
Sat, 26 Apr 2014 22:25:18 +0000 (00:25 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 26 Apr 2014 22:25:47 +0000 (00:25 +0200)
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.

src/position.cpp

index 7b345fd9c9c731515a46490fe1768d3687f134b6..6b05c24b2a434d3ef1f41b454af877883dc0b765 100644 (file)
@@ -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);