Sudoku solver

Chris Angelico rosuav at gmail.com
Sun Mar 29 00:10:46 EDT 2015


On Sun, Mar 29, 2015 at 2:06 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Sun, 29 Mar 2015 10:50 am, BartC wrote:
>
>> (X is my own interpreted language, which is where my interest in this
>> is. This had been generally faster than Python until PyPy came along. It
>> does however use a pure byte-code interpreter, so the result is not too
>> bad.
>>
>> But using X *and* my own brute-force algorithm, the same puzzle took 2
>> seconds to solve - faster than C!
>
> But, when you tell me that your very own personal interpreted language,
> which I assume nobody else has worked on, is 40% faster than optimized C,
> my first reaction is to expect that you've probably made a mistake
> somewhere. I would have the same reaction if somebody casually dropped into
> a conversation that they happened to beat Usain Bolt's 100m personal best
> of 9.58 seconds by almost four seconds. While carrying a 20kg backpack.

I think you're misreading the stats. The first table compares
languages, all using the same algorithm, and in that, C beat X ten to
one, unoptimized. The second figure, when X took only 2 seconds, was
demonstrating the massive improvement that the algorithmic change
(from "the OP's algorithm" to "[BartC's] own brute-force algorithm")
achieved. For comparison, that's like casually dropping into
conversation that you happened to drive a car faster than Usain Bolt's
personal best. :)

ChrisA



More information about the Python-list mailing list