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

@@ -158,9 +158,8 @@ public:
void undo_null_move();
// Static exchange evaluation
int see(Move m) const;
int see(Move m, int asymmThreshold = 0) const;
int see_sign(Move m) const;
int see_asymm(Move m, int asymmThreshold) const;
// Accessing hash keys
Key key() const;
@@ -194,7 +193,6 @@ private:
// Helper functions
void do_castle(Square kfrom, Square kto, Square rfrom, Square rto);
template<bool Asymmetric> int do_see(Move m, int asymmThreshold) const;
template<bool FindPinned> Bitboard hidden_checkers() const;
// Computing hash keys from scratch (for initialization and debugging)