Sudokumaci - fast sudoku solver in Zig

sudokumaci - fast sudoku solver in Zig


At the peak of pandemic isolation, when the winters were cold and full of lockdowns, out of sheer boredom, I started coding my Sudoku solver. It took about 5 years to get it to solve ~1.3 million puzzles per second on an Intel i9 16-thread CPU. I used Zig comptime generation heavily for pre-building large lookup tables, and used them to solve Sudokus faster.

Supported Zig versions

It is still on 0.15.2. Every time I decide to port to 0.16, I end up improving something else about the solver.

AI / LLM usage disclosure

When I started this project LLMs were not a thing. But I used them recently to polish and hopefully make the code more readable for everyone.

3 Likes