storing shorter hashKey in TTEntry | bench 1132682
This commit is contained in:
1 parent
46eb8d4b35
commit
f83f3a5b8f
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -8,7 +8,7 @@
|
||||
class Board;
|
||||
|
||||
#ifdef __AVX512F__
|
||||
constexpr usize ALIGNMENT = 64;
|
||||
constexpr size_t ALIGNMENT = 64;
|
||||
#else
|
||||
constexpr size_t ALIGNMENT = 32;
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
|
||||
TTEntry *current = &table[hashKey % table.size()];
|
||||
|
||||
if (current->hashKey == hashKey) {
|
||||
if (current->hashKey == static_cast<uint16_t>(hashKey)) {
|
||||
if (current->depth >= depth) {
|
||||
if (current->nodeType == PV){
|
||||
return {current->score, current->bestMove};
|
||||
@@ -22,7 +22,7 @@ SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
|
||||
void TTable::WriteEntry(U64 &hashKey, int depth, int score, int nodeType, Move bestMove) {
|
||||
TTEntry *current = &table[hashKey % table.size()];
|
||||
|
||||
current->hashKey = hashKey;
|
||||
current->hashKey = static_cast<uint16_t>(hashKey);
|
||||
current->nodeType = nodeType;
|
||||
current->score = score;
|
||||
current->depth = depth;
|
||||
|
||||
+2
-2
@@ -21,13 +21,13 @@ public:
|
||||
|
||||
class TTEntry {
|
||||
public:
|
||||
U64 hashKey = 0;
|
||||
uint16_t hashKey = 0;
|
||||
int depth = 0;
|
||||
int score = 0;
|
||||
int nodeType = 0;
|
||||
Move bestMove = Move();
|
||||
|
||||
operator U64() {
|
||||
operator uint16_t() {
|
||||
return hashKey;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user