[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sudoku puzzle solver for Apple II



> I don't believe that!  Check out this Sudoku solver:
>     http://homepage.ntlworld.com/valleyway/solver.html
>
> It's written in Javascript, which of course is a quite inefficient
> programming language - yet it needs less than half a second to solve
> a sudoku, on a 4+ year old PC running at a moderate 1.8 GHz clock speed.

Javascript isn't all that bad. :-P  Sure, it's not exactly suited for
realtime applications, but once the code has been interpreted and all
data structures are created, it's pretty decent actually.  I've found
it to be not much slower than, say, Perl.  Some things in the language
are actually a lot faster than you think!  Dynamically-created data
structures are not a strong-point of javascript when speed is concerned
though.

http://www.jorendorff.com/articles/javascript/speed-test.html

I don't see enough people rag on the speed of, say, Ruby or Python.
:-D

> ...but why does it require a 65C02 ?  Couldn't it have been written
> in plain 6502 assembly language?

*sigh*  Why are there so many anti-65c02 enthusiasts out there?  Can't
you afford a free emulator that can handle the opcodes or shell out $6
for a new 65c02 processor?  But, seriously, I have a strong preference
for 65c02 opcodes in my code as well becase it's a slight bit more
convienent.  Why limp when you can walk?  (or use 65816 and go for a
jog ;-)

-B