projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0ddf848
)
Use a 32 bit bitwise 'and' in SimpleHash lookup
author
Marco Costalba
<mcostalba@gmail.com>
Fri, 7 Jan 2011 10:10:20 +0000 (11:10 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Fri, 7 Jan 2011 10:25:13 +0000 (11:25 +0100)
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>
src/tt.h
patch
|
blob
|
history
diff --git
a/src/tt.h
b/src/tt.h
index
f2928fb
..
d7f57cc
100644
(file)
--- 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;