Optimi-Zi(n)g Sudoku-Solving
A detailed exploration of optimizing a Sudoku solver written in Zig using the Dancing Links (DLX) algorithm. The author demonstrates how to convert Sudoku into an exact-cover problem with 324 constraints and explains the backtracking approach. Key optimizations include reducing memory allocations from 3000 to just 3 per puzzle, using compiler flags like ReleaseFast, eliminating heap usage in favor of stack-only operations, and optimizing matrix preparation by skipping unnecessary partial solutions. Performance improved from 1ms to 0.061ms per puzzle, with multithreading achieving 138k puzzles per second throughput.