Simplify and speed up previous patch

Use an optinal argument instead of a template
parameter. Interestingly, not only is simpler,
but also faster, perhaps due to less L1 instruction
cache pressure because we don't duplicate the very
used SEE code path.

No functional change.
This commit is contained in:
Marco Costalba
2013-04-09 23:18:28 +02:00
parent d23454854e
commit a95cbca568
3 changed files with 15 additions and 35 deletions

View File

@@ -1225,11 +1225,11 @@ split_point_start: // At split points actual search starts from here
continue;
}
// Prune moves with negative or equal SEE.
// Also prune moves with positive SEE where capturing loses a tempo and SEE < beta - futilityBase.
// Prune moves with negative or equal SEE and also moves with positive
// SEE where capturing piece loses a tempo and SEE < beta - futilityBase.
if ( futilityBase < beta
&& depth < DEPTH_ZERO
&& pos.see_asymm(move, beta - futilityBase) <= 0)
&& pos.see(move, beta - futilityBase) <= 0)
{
bestValue = std::max(bestValue, futilityBase);
continue;