From: Marco Costalba Date: Fri, 7 Jan 2011 10:10:20 +0000 (+0100) Subject: Use a 32 bit bitwise 'and' in SimpleHash lookup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=dcbc8a7e7584511fe31db94c1b011e9ab541ca21;p=fairystockfish.git 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 --- diff --git a/src/tt.h b/src/tt.h index f2928fb..d7f57cc 100644 --- a/src/tt.h +++ b/src/tt.h @@ -60,7 +60,7 @@ public: ~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: Entry* entries;