tdillon wrote:Also I wasn't sure what bias might arise from datasets which are presented in a normalized form.
For example representing puzzle in its lexicographically minimal form trends to move the denser band to the bottom of the puzzle. fsss2 exploits this fact.
tdillon wrote:What do you mean by lazy benchmarks?
I mean that despite the efforts of the guys that collected these excellent puzzle sets, some testers (me and some others) neglected the necessity of buffering, scrambling, automatically adjusting the set size, etc. This results to lower quality benchmarking.
Maybe here is reasonable to note that in your benchmark in theory the compiler could see that nothing is done with the solutions (they aren't validated by default at the benchmark phase) and then progressively optimize the code up to counting the guesses.
tdillon wrote:Thanks for pointing out that the most practical use case is to determine whether there are 0,1,2+ solutions. The way I was calling FSSS2 in other_solvers.cc didn't anticipate this and was just using getSingleSolution whether we're looking for 1 or 2. I've changed this to use hasOneSolution instead when we pass a limit other than 1. I expected this to slow FSSS2 down by ~50% on the hard data sets, but actually there was no change because getSingleSolution was already looking for 2 solutions:
- Code: Select all
bool getSingleSolution::solutionFound() {
return (++nsol == 2); //stop after possible second solution
}
This seems link an unnecessary handicap, no?
hasAnySolution::solve(const char* p) solves up to the first solution and returns 0 for no-solution or 1 for 1+ solutions.
hasSingleSolution::solve(const char* p) solves up to the second solution and returns 0 or 1 or 2 respectively for no-solution, single solution, and 2+ solutions.
solutionFound() returns true if the solving process must be forced to stop.
tdillon wrote:Note: I've generally been running benchmarking with clang since it produces faster code than gcc for both JCZSolve and Tdoku. But it does look like the opposite is true for FSSS2:
This isn't surprise because fsss2 is developed and optimized on GCC.
P.S. To minimize the off-topic here, I will send you few more comments in private message.