diff --git a/src/cpp/prunetable.cpp b/src/cpp/prunetable.cpp index 68e9a75f..5df31ab7 100644 --- a/src/cpp/prunetable.cpp +++ b/src/cpp/prunetable.cpp @@ -306,8 +306,9 @@ prunetable::prunetable(const puzdef &pd, ull maxmem) { void prunetable::filltable(const puzdef &pd, int d) { popped = 0; wbval = min(d, 14); + ll ofillcnt = fillcnt; if (quiet == 0) - cout << "Filling table at depth " << d << " with val " << wval << flush; + cout << "Filling depth " << d << " val " << wval << flush; makeworkchunks(pd, d, pd.solved); int wthreads = setupthreads(pd, *this); for (int t = 0; t < wthreads; t++) @@ -320,10 +321,12 @@ void prunetable::filltable(const puzdef &pd, int d) { #else fillthreadworker((void *)&workerparams[0]); #endif - if (quiet == 0) - cout << " saw " << popped << " (" << fillcnt << ") in " << duration() - << endl - << flush; + if (quiet == 0) { + double dur = duration(); + double rate = (fillcnt - ofillcnt) / dur / 1e6 ; + cout << " saw " << popped << " (" << (fillcnt - ofillcnt) + << ") in " << dur << " rate " << rate << endl << flush; + } ptotpop = totpop; totpop += popped; justread = 0; diff --git a/src/cpp/solve.cpp b/src/cpp/solve.cpp index dfd3a3ab..4e0891cb 100644 --- a/src/cpp/solve.cpp +++ b/src/cpp/solve.cpp @@ -209,6 +209,7 @@ int solve(const puzdef &pd, prunetable &pt, const setval p, generatingset *gs) { int hid = 0; randomized.clear(); for (int d = initd; d <= maxdepth; d++) { + ll olookups = pt.lookupcnt; if (randomstart) { while ((int)randomized.size() <= d) { randomized.push_back({}); @@ -250,16 +251,18 @@ int solve(const puzdef &pd, prunetable &pt, const setval p, generatingset *gs) { duration(); double actualtime = start - starttime; cout << "Found " << solutionsfound << " solution" - << (solutionsfound != 1 ? "s" : "") << " at maximum depth " << d + << (solutionsfound != 1 ? "s" : "") << " max depth " << d << " lookups " << totlookups << " in " << actualtime << " rate " - << (totlookups / actualtime) << endl + << (totlookups / actualtime / 1e6) << endl << flush; return d; } double dur = duration(); + ll lookups = pt.lookupcnt - olookups; + double rate = lookups / dur / 1e6; if (verbose) { if (verbose > 1 || dur > 1) - cout << "Depth " << d << " finished in " << dur << endl << flush; + cout << "Depth " << d << " in " << dur << " lookups " << lookups << " rate " << rate << endl << flush; } if (flushback) if (flushback(d))