From: Paul Battley Date: 2006-06-30T18:08:51+09:00 Subject: Re: Huge performance gap On 23/02/06, Alexis Reigel wrote: > Hi all > > I've ported the following c++ code to ruby. It is a recursive > (backtracking) sudoku-solving algorithm. Well, I was rather surprised by > the execution time I got: > > c++ code: 0.33 seconds > ruby code: 27.65 seconds Ruby *is* relatively slow, but the algorithm is the problem. This Ruby program I wrote a while ago can solve it in under half a second: http://po-ru.com/files/sudoku/1.0/sudoku.tar.gz It's quite a bit more complicated, however. Paul.