mirror of
https://github.com/sockspls/badfish
synced 2025-07-12 03:59:15 +00:00
Micro-optimize SEE
Results for 10 tests for each version (gcc 4.8.3 on mingw): Base Test Diff Mean 1502447 1507917 -5470 StDev 3119 1364 4153 p-value: 0,906 speedup: 0,004 Results for 10 tests for each version (MSVC 2013): Base Test Diff Mean 1400899 1403713 -2814 StDev 1273 2804 2700 p-value: 0,851 speedup: 0,002 No functional change.
This commit is contained in:
parent
8b0fee9998
commit
47a0768102
1 changed files with 1 additions and 11 deletions
|
@ -1098,21 +1098,11 @@ Value Position::see(Move m) const {
|
||||||
|
|
||||||
// Locate and remove the next least valuable attacker
|
// Locate and remove the next least valuable attacker
|
||||||
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
||||||
|
|
||||||
// Stop before processing a king capture
|
|
||||||
if (captured == KING)
|
|
||||||
{
|
|
||||||
if (stmAttackers == attackers)
|
|
||||||
++slIndex;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
stm = ~stm;
|
stm = ~stm;
|
||||||
stmAttackers = attackers & pieces(stm);
|
stmAttackers = attackers & pieces(stm);
|
||||||
++slIndex;
|
++slIndex;
|
||||||
|
|
||||||
} while (stmAttackers);
|
} while (stmAttackers && (captured != KING || (--slIndex, false))); // Stop before a king capture
|
||||||
|
|
||||||
// Having built the swap list, we negamax through it to find the best
|
// Having built the swap list, we negamax through it to find the best
|
||||||
// achievable score from the point of view of the side to move.
|
// achievable score from the point of view of the side to move.
|
||||||
|
|
Loading…
Add table
Reference in a new issue