mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00: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:
@@ -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