Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Tony van der Hoff Newsgroups: comp.lang.python Subject: Re: Pyhon 2.x or 3.x, which is faster? Date: Mon, 7 Mar 2016 10:45:18 +0000 Lines: 23 Message-ID: References: <56dc41b5$0$1585$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de hnUTBwYcZw0rwNyVvHEU/wCQIM90wMHEK0tP6EWt46Rw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.081 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'subject:which': 0.09; 'python': 0.10; '2.7': 0.13; 'file,': 0.15; '2016': 0.16; 'excellent,': 0.16; 'python3.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:speed': 0.16; 'wrote:': 0.16; '3.x': 0.22; 'slightly': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'van': 0.26; 'probably': 0.31; 'url:python': 0.33; "d'aprano": 0.33; 'impression': 0.33; 'steven': 0.33; 'this?': 0.34; 'that,': 0.34; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'faster': 0.36; 'to:addr:python- list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'version': 0.38; 'received:localdomain': 0.38; 'thank': 0.38; 'hi,': 0.38; 'test': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'show': 0.62; 'charset:windows-1252': 0.62; 'different': 0.63; 'latest': 0.64; 'mar': 0.65; 'believe': 0.66; '10%': 0.72; 'from:addr:tony': 0.84; 'received:192.168.1.7': 0.91; 'overall,': 0.93 X-Virus-Scanned: Debian amavisd-new at mail.vanderhoff.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 In-Reply-To: <56dc41b5$0$1585$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104204 On 06/03/16 14:41, Steven D'Aprano wrote: > On Sun, 6 Mar 2016 10:34 pm, Tony van der Hoff wrote: > >> Hi, I've been experimenting with a short test program under python 2.7 >> and python 3.4.2. It's a simple read from file, and locate a word therein. >> >> I get the (subjective) impression that python2 is slightly faster than >> python3. Is that correct? Is there any documentation to support this? > > I believe that, overall, Python 3 is still slightly slower than Python 2, > but it's a near thing. Have a look at the latest performance benchmarks: > > https://speed.python.org/comparison/ > > Eyeballing the graph, I estimate that the latest 3.x version is probably > about 10% slower overall, although different benchmarks show different > speeds. Excellent, just what I was looking for. Thank you very much, Steven. -- Tony van der Hoff | mailto:tony@vanderhoff.org Buckinghamshire, England |