2.5. Order of Trade-offs in the Design of the Code

Freecell Solver has the following trade offs in the design of the code:

  1. Modularity - the code should be as generic as possible and allow for maximal flexibility. The user should be able to configure the library as he pleases.

  2. Speed - the code should be optimized for speed. Many times in the code, it was made a bit less comprehensible to gain speed, and many times extra techniques are implemented to ensure this goal.

  3. Memory Consumption - should be reduced as much as possible. A reduced memory consumption usually leads to better speed, because there are less cache misses this way.

  4. Smart Algorithms - generally, algorithms with a low complexity and such that give advantage to the code are implemented.

Note that these trade-offs are subject to the programmer's whims, and many times, one was a bit sacrificed to satisfy the other.