I'll try that with my Ruby GTP code. I'm assuming random moves until no non-eye-filling moves are left and on a 9x9 board?
On Nov 20, 2007 9:58 AM, Chuck Paulson <[EMAIL PROTECTED]> wrote: > > > > > My 2 cents about languages. > > > > C is the universal "assembly language". I don't think I've ever used a > computer family that didn't have a C compiler on it (after C was invented of > course). Often new languages, to get started, will just translate into C > code and then compile with the C compiler. > > > > I wrote my first Go programs earlier this year. I first used Ruby and it was > short and easy to write. The GTP protocol (enough for CGOS) took only about > 1 page of code. However in timing tests, it could only do about 30 game > simulations per second. This was unacceptable and I abandoned Ruby. > > > > Next I translated the ideas into C++. Everything was more work, but I > anticipated a 10-20 times speed up so it seemed the tradeoff would be worth > it. After finishing, I did the same timing tests as with Ruby and it did > 9000 game simulations per second without much optimization. I knew, of > course, that Ruby is slower than C++ but a factor of 300 is amazing. It > helps to have explicit control of memory and mature C compilers that > generate fast code. > > > > I am still wondering how Ruby could be so much slower than C++. Perhaps this > problem is just not suited for Ruby. > > > > Chuck Paulson > > > _______________________________________________ > computer-go mailing list > computer-go@computer-go.org > http://www.computer-go.org/mailman/listinfo/computer-go/ > _______________________________________________ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/