From c6f521009d09f081cce3ad9598466694d3a3369d Mon Sep 17 00:00:00 2001 From: rektdie Date: Tue, 11 Mar 2025 11:16:15 +0100 Subject: [PATCH] bench used prev TT entries --- source/benchmark.cpp | 5 +++++ source/search.cpp | 1 - source/search.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/benchmark.cpp b/source/benchmark.cpp index 66753dd..2458c17 100644 --- a/source/benchmark.cpp +++ b/source/benchmark.cpp @@ -1,6 +1,7 @@ #include "benchmark.h" #include "search.h" #include "stopwatch.h" +#include "tt.h" #include const std::array fenPositions = { @@ -60,6 +61,9 @@ void RunBenchmark() { Board board; int depth = 5; benchStarted = true; + searchStopped = false; + TT.Clear(); + nodes = 0; Stopwatch sw; for (int i = 0; i < fenPositions.size(); i++) { @@ -69,5 +73,6 @@ void RunBenchmark() { std::cout << nodes << " nodes " << int(nodes/sw.GetElapsedSec()) << " nps\n"; nodes = 0; + TT.Clear(); benchStarted = false; } diff --git a/source/search.cpp b/source/search.cpp index 765c2f5..518371a 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -10,7 +10,6 @@ bool benchStarted = false; static inline int ply = 0; static inline int timeToSearch = 0; -static inline bool searchStopped = false; static inline bool doingNullMove = false; // [id][ply] diff --git a/source/search.h b/source/search.h index de1de74..8ea4d9e 100644 --- a/source/search.h +++ b/source/search.h @@ -11,6 +11,8 @@ extern bool benchStarted; constexpr int inf = 100000; +inline bool searchStopped = false; + class SearchResults { public: int score = 0;