storing searchcontext on the heap instead of the stack | bench 3415609

This commit is contained in:
rektdie committed 2025-06-05 02:03:43 +02:00
1 parent 62d1c4a064
commit 5a45d29f66
6 files changed
+142 -123

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ void RunBenchmark() {
Board board;
int depth = BENCH_DEPTH;
SearchContext ctx;
SEARCH::SearchContext *ctx = new SearchContext();
Stopwatch sw;
for (int i = 0; i < fenPositions.size(); i++) {
@@ -72,5 +72,5 @@ void RunBenchmark() {
SearchPosition<bench>(board, SearchParams(), ctx);
}
std::cout << ctx.nodes << " nodes " << int(ctx.nodes/sw.GetElapsedSec()) << " nps" << std::endl;
std::cout << ctx->nodes << " nodes " << int(ctx->nodes/sw.GetElapsedSec()) << " nps" << std::endl;
}