mobility: Do not update mobility if not enabled
The performance improvement is 1%-2%.
This commit is contained in:
parent
48a28c74bb
commit
7bc437c367
|
@ -23,6 +23,7 @@
|
|||
#include "position.h"
|
||||
#include "thread.h"
|
||||
#include "mills.h"
|
||||
#include "option.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
|
@ -1356,6 +1357,10 @@ void Position::reset_bb()
|
|||
|
||||
void Position::updateMobility(MoveType mt, Square s)
|
||||
{
|
||||
if (!gameOptions.getConsiderMobility()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Bitboard adjacentWhiteBB = byColorBB[WHITE] & MoveList<LEGAL>::adjacentSquaresBB[s];
|
||||
Bitboard adjacentBlackBB = byColorBB[BLACK] & MoveList<LEGAL>::adjacentSquaresBB[s];
|
||||
Bitboard adjacentNoColorBB = (~(byColorBB[BLACK] | byColorBB[WHITE])) & MoveList<LEGAL>::adjacentSquaresBB[s];
|
||||
|
|
Loading…
Reference in New Issue