mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user