Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Andrew Jaffe Newsgroups: comp.lang.python Subject: Re: Pyhon 2.x or 3.x, which is faster? Date: Mon, 7 Mar 2016 11:54:28 +0000 Lines: 33 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 6lcHns9ivn9ZCLod/ETVhQ2kHrihFuqJg1ZvifIi1aIg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'cpython': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:which': 0.09; 'python': 0.10; '2.7': 0.13; 'file,': 0.15; '2016': 0.16; 'build?': 0.16; 'python3.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'url:speed': 0.16; 'wrote:': 0.16; '3.x': 0.22; '64-bit': 0.22; 'slightly': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'van': 0.26; 'andrew': 0.27; 'branch': 0.30; 'probably': 0.31; 'are:': 0.32; 'url:python': 0.33; 'third': 0.33; "d'aprano": 0.33; 'impression': 0.33; 'steven': 0.33; 'this?': 0.34; 'that,': 0.34; 'question,': 0.35; "isn't": 0.35; '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; 'two': 0.37; 'being': 0.37; 'received:org': 0.37; 'version': 0.38; 'hi,': 0.38; 'test': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'received:uk': 0.61; 'show': 0.62; 'charset:windows-1252': 0.62; 'different': 0.63; 'latest': 0.64; 'mar': 0.65; 'believe': 0.66; 'received:ac.uk': 0.66; '10%': 0.72; 'dumb': 0.84; 'overall,': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: dyn1203-177.wlan.ic.ac.uk User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.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:104210 On 06/03/2016 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. > Dumb question, and this probably isn't the place for it, but the three Pythons being tested are: 64-bit CPython on Li... latest in branch '2.7' 64-bit CPython on Li... latest in branch '3.5' 64-bit CPython on Li... latest I understand that the first two are the released 2.7 and 3.5 versions; is the third the most recent 3.x build? Andrew