Remove some pointless micro-optimizations

Seems to give around 1% speed-up for CPUs with popcnt support.
Seems to give a very minor speed-up for CPUs without popcnt.

No functional change

Resolves #646
This commit is contained in:
DU-jdto
2016-04-21 14:23:40 +10:00
committed by Joona Kiiski
parent 94e41274bb
commit c737062436
3 changed files with 9 additions and 21 deletions

View File

@@ -501,8 +501,7 @@ bool Position::legal(Move m, Bitboard pinned) const {
// A non-king move is legal if and only if it is not pinned or it
// is moving along the ray towards or away from the king.
return !pinned
|| !(pinned & from)
return !(pinned & from)
|| aligned(from, to_sq(m), square<KING>(us));
}
@@ -595,8 +594,7 @@ bool Position::gives_check(Move m, const CheckInfo& ci) const {
return true;
// Is there a discovered check?
if ( ci.dcCandidates
&& (ci.dcCandidates & from)
if ( (ci.dcCandidates & from)
&& !aligned(from, to, ci.ksq))
return true;