Sudoku resolver : mojo is back ;-)

A while back … I’ve made a github repo to compare sudoku resolution with multiples languages (see here : Looking for 0.4.0 mojo users .... can you test this ? (0.6.0 results) · modular/modular · Discussion #1225 · GitHub )

It’s now back :

yet, I took time to upgrade mojo from a very old version to newest one :wink:

So it’s back again. (since my last mojo tests, it’s now 4x faster)

I don’t have time to fix the speedest version ( sudoku_resolver/specialized/sudoku.mojo at master · manatlan/sudoku_resolver · GitHub ), if someone wants to fix it : no problem, I accept PR.

Here a current results :



sudoku.go : algo with strings
  - go    : 16.672 seconds (144x, 16.564><17.145)

sudoku.java : algo with strings
  - java  : 29.934 seconds (1x, 29.934><29.934)

sudoku.js : algo with strings
  - node  : 30.111 seconds (1x, 30.111><30.111)

sudoku.mojo : algo with strings (use python to read stdin)
  - mojo  : 22.574 seconds (1x, 22.574><22.574)

sudoku.nim : algo with strings
  - nim   : 23.481 seconds (45x, 22.930><24.156)

sudoku.php : algo with strings
  - php   : 82.668 seconds (1x, 82.668><82.668)

sudoku.py : algo with strings
  - codon : 13.706 seconds (1x, 13.706><13.706)
  - py3   : 88.581 seconds (144x, 86.923><93.035)
  - pypy  : 19.042 seconds (376x, 17.905><36.082)

sudoku.rs : algo with Strings (as byte[])
  - rust  : 12.293 seconds (1x, 12.293><12.293)


And for specialized version

specialized/sudoku.rs : algo with specialized types
  - rust  : 0.692 seconds (1x, 0.692><0.692)

(the specialized/sudoku.mojo is broken)

4 Likes

Whoa, 4x is good progress, nice work!