bench used prev TT entries

This commit is contained in:
rektdie committed 2025-03-11 11:16:15 +01:00
1 parent 8e6b8db124
commit c6f521009d
3 files changed
+7 -1

No files matched your search

+5
View File
@@ -1,6 +1,7 @@
#include "benchmark.h" #include "benchmark.h"
#include "search.h" #include "search.h"
#include "stopwatch.h" #include "stopwatch.h"
#include "tt.h"
#include <array> #include <array>
const std::array<std::string, 50> fenPositions = { const std::array<std::string, 50> fenPositions = {
@@ -60,6 +61,9 @@ void RunBenchmark() {
Board board; Board board;
int depth = 5; int depth = 5;
benchStarted = true; benchStarted = true;
searchStopped = false;
TT.Clear();
nodes = 0;
Stopwatch sw; Stopwatch sw;
for (int i = 0; i < fenPositions.size(); i++) { for (int i = 0; i < fenPositions.size(); i++) {
@@ -69,5 +73,6 @@ void RunBenchmark() {
std::cout << nodes << " nodes " << int(nodes/sw.GetElapsedSec()) << " nps\n"; std::cout << nodes << " nodes " << int(nodes/sw.GetElapsedSec()) << " nps\n";
nodes = 0; nodes = 0;
TT.Clear();
benchStarted = false; benchStarted = false;
} }
-1
View File
@@ -10,7 +10,6 @@ bool benchStarted = false;
static inline int ply = 0; static inline int ply = 0;
static inline int timeToSearch = 0; static inline int timeToSearch = 0;
static inline bool searchStopped = false;
static inline bool doingNullMove = false; static inline bool doingNullMove = false;
// [id][ply] // [id][ply]
+2
View File
@@ -11,6 +11,8 @@ extern bool benchStarted;
constexpr int inf = 100000; constexpr int inf = 100000;
inline bool searchStopped = false;
class SearchResults { class SearchResults {
public: public:
int score = 0; int score = 0;