return 42;

by Jan Wedel

Gridsolve Cover Image

Nonogram Solver Update 1.1

I have released an updated version of the Nonogram Solver GridSolve.

In this update, I improved the performance vastly by increasing the parallelism. GridSolve uses WebWorkers which will run on native OS threads that can make use of multi-core CPUs. When I wrote GridSolve, my computer had 2 cores, so a limited the parallelism to that two cores. After getting my new MacBook Pro M1 I was expecting a performance boost which wasn't there. So I investigated the implementation and found the hardcoded value. If your browser supports the hardware API to return the number of cores, it will use that. Otherwise it will assume 16 cores.

Also, I was able to introduce unit tests for GridSolve which allowed me to find a couple of bugs that led to incomplete solutions. The latest version can solve very huge Nonograms (45x45) with ~470,000 iterations in just 1:50min! On my old computer it took about 20min to solve significantly smaller Nonogram.

Click here to try it


Jan Wedel's DEV Profile