From cb4ac4221e8a178294c084670eff3fa0414135a8 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 27 Apr 2014 00:25:18 +0200 Subject: [PATCH] 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. --- src/position.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2