Revert "storing shorter hashKey in TTEntry | bench 1132682"

This reverts commit f83f3a5b8f.
This commit is contained in:
rektdie committed 2025-05-10 23:52:05 +02:00
1 parent f83f3a5b8f
commit a52cfbf839
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
class Board; class Board;
#ifdef __AVX512F__ #ifdef __AVX512F__
constexpr size_t ALIGNMENT = 64; constexpr usize ALIGNMENT = 64;
#else #else
constexpr size_t ALIGNMENT = 32; constexpr size_t ALIGNMENT = 32;
#endif #endif
+2 -2
View File
@@ -3,7 +3,7 @@
SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) { SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
TTEntry *current = &table[hashKey % table.size()]; TTEntry *current = &table[hashKey % table.size()];
if (current->hashKey == static_cast<uint16_t>(hashKey)) { if (current->hashKey == hashKey) {
if (current->depth >= depth) { if (current->depth >= depth) {
if (current->nodeType == PV){ if (current->nodeType == PV){
return {current->score, current->bestMove}; 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) { void TTable::WriteEntry(U64 &hashKey, int depth, int score, int nodeType, Move bestMove) {
TTEntry *current = &table[hashKey % table.size()]; TTEntry *current = &table[hashKey % table.size()];
current->hashKey = static_cast<uint16_t>(hashKey); current->hashKey = hashKey;
current->nodeType = nodeType; current->nodeType = nodeType;
current->score = score; current->score = score;
current->depth = depth; current->depth = depth;
+2 -2
View File
@@ -21,13 +21,13 @@ public:
class TTEntry { class TTEntry {
public: public:
uint16_t hashKey = 0; U64 hashKey = 0;
int depth = 0; int depth = 0;
int score = 0; int score = 0;
int nodeType = 0; int nodeType = 0;
Move bestMove = Move(); Move bestMove = Move();
operator uint16_t() { operator U64() {
return hashKey; return hashKey;
} }
}; };