mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Use a 32 bit bitwise 'and' in SimpleHash lookup
A bit faster on 32 bits machines, more similar to TranspositionTable::first_entry() and same result. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
2
src/tt.h
2
src/tt.h
@@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
~SimpleHash() { delete [] entries; }
|
~SimpleHash() { delete [] entries; }
|
||||||
|
|
||||||
Entry* find(Key key) const { return entries + unsigned(key & (HashSize - 1)); }
|
Entry* find(Key key) const { return entries + ((uint32_t)key & (HashSize - 1)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Entry* entries;
|
Entry* entries;
|
||||||
|
|||||||
Reference in New Issue
Block a user