3 ms·
I realised the backtracker can stop early as soon as all squares are filled in (doh!). As a result the timings have changed dramatically. Database generation:
by questerzen 1y ago
I realised the backtracker can stop early as soon as all squares are filled in (doh!). As a result the timings have changed dramatically.
Database generation: 25s;
Sequential solver - all 'solvable' problems or abandon: 52s;
Backtracking solver - all solutions: 19s;
Database Lookup - all solutions: 16s;
Key takeaway is that the backtracker is not only much simpler, its actually much faster (for a computer at least) and almost as fast as looking up the answer in a table.