Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.080 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'languages,': 0.04; 'pypy': 0.07; 'interpreted': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'language,': 0.12; 'assume': 0.14; 'algorithmic': 0.16; 'compares': 0.16; 'figure,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'interpreter,': 0.16; 'seconds,': 0.16; 'seconds.': 0.16; 'somewhere.': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'on,': 0.29; 'am,': 0.29; 'generally': 0.29; 'message-id:@mail.gmail.com': 0.30; 'along.': 0.31; 'bad.': 0.31; "d'aprano": 0.31; 'dropped': 0.31; 'steven': 0.31; 'probably': 0.32; 'worked': 0.33; 'table': 0.34; '"the': 0.34; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'seconds': 0.37; 'too': 0.37; 'massive': 0.38; 'somebody': 0.38; 'pm,': 0.38; 'that,': 0.38; 'expect': 0.39; 'does': 0.39; '(from': 0.39; 'is.': 0.60; 'solve': 0.60; 'tell': 0.60; 'took': 0.61; "you're": 0.61; 'first': 0.61; "you've": 0.63; 'personal': 0.63; 'interest': 0.64; 'mar': 0.68; 'beat': 0.68; 'nobody': 0.68; 'optimized': 0.68; 'car': 0.72; '*and*': 0.84; '2015': 0.84; '40%': 0.84; 'algorithm,': 0.84; 'improvement': 0.84; 'mistake': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=SYKx9MPo/secrhpYTEBfwVhoQCkWBPtCuM/7xWYtmhU=; b=zFSlVwyhkokUhz6BaAB3fat2jrhCvLSGEnkZT/+E2w3WfKWjz0ZZn9j/z4g+hQTdKT uVUAzNttG6/q/7Mm35w2HLJwlRZKNhZ7irkgAz93W8fPX8UCUb/j8DqJKKm2w/1Lomx1 +Hi6XG5JR8c4qAsp/94orJry+tWeBHF1FL9OevTV+C+xiV8b9o+CoErPl4H+nV6Hppqu YmB975sDGydjU1NbbPhYa1kQR7e+MwXDGTXXfulVSp2AFhxSVpufoTTuJzbWZE0vhvEv UOnwSDHYzTbEWSPjztAMIAhjjh9XLNNynPZtdUgPzrFo9RbL2dS7fm0F79iko8mhCUCd wbsw== MIME-Version: 1.0 X-Received: by 10.107.16.87 with SMTP id y84mr6091303ioi.53.1427602246981; Sat, 28 Mar 2015 21:10:46 -0700 (PDT) In-Reply-To: <55176c2c$0$13009$c3e8da3$5496439d@news.astraweb.com> References: <87r3sdnw5t.fsf@elektro.pacujo.net> <4e81bdb9-52db-46e6-b449-d4241cb2a3f2@googlegroups.com> <87twx8amww.fsf@elektro.pacujo.net> <82e7c5b9-2f0f-405b-859c-b74916c475e0@googlegroups.com> <55176c2c$0$13009$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 29 Mar 2015 15:10:46 +1100 Subject: Re: Sudoku solver From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427602256 news.xs4all.nl 2835 [2001:888:2000:d::a6]:54828 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88244 On Sun, Mar 29, 2015 at 2:06 PM, Steven D'Aprano 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