The fact
Naive recursion causes exponential explosion of function calls and drastically slows the program on standard grids.
The optimized approach significantly reduces complexity and makes the solver practical for real games.
Click the link to read an article on the topic: