Based on the feedback of user Jimmaclein this issue, the following improvements have been made:
solver runtime durations are calculated using System.Diagnostic.Stopwatch rather than multiple snapshots of DateTime.Now
integer solver classes implement generic solver interfaces as public methods which allows users to access them implicitly, rather than forcing an explicit cast
The above issue also suggested improving the control flow of the search algorithm by no longer throwing exceptions, and dropping use of LINQ. The argument for both was primarily regarding performance, however, in both cases performance is a negligable concern. Exceptions are only thrown in rare / exceptional circumstances, when a problem is unsolveable, or all of the search space has been traversed. Decider is an NP-complete solver and efficiency is concerned with taking multiple seconds or minutes from problem solving. Similarly, dropping LINQ did not result in a noticeable (beyond noise) improvement to runtimes, so I prefer to retain the declarative coding style rather imperative.
Based on the feedback of user Jimmaclein this issue, the following improvements have been made:
The above issue also suggested improving the control flow of the search algorithm by no longer throwing exceptions, and dropping use of LINQ. The argument for both was primarily regarding performance, however, in both cases performance is a negligable concern. Exceptions are only thrown in rare / exceptional circumstances, when a problem is unsolveable, or all of the search space has been traversed. Decider is an NP-complete solver and efficiency is concerned with taking multiple seconds or minutes from problem solving. Similarly, dropping LINQ did not result in a noticeable (beyond noise) improvement to runtimes, so I prefer to retain the declarative coding style rather imperative.