3 ms·
Many years ago I tackled the Project Euler problem involving Sudoku. I wrote a solution. Ran it. It worked but was way slower than I wanted it to be. I goog
by btilly 14y ago
Many years ago I tackled the Project Euler problem involving Sudoku. I wrote a solution. Ran it. It worked but was way slower than I wanted it to be.
I googled, found Norvig's article. Read it. Looked conceptually simpler. Tried implementing again. Massively faster.
Why? Because I used strings rather than a fancy object representation. And strings are faster. Not a little bit, but an order of magnitude at least.