Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Serhiy Storchaka Newsgroups: comp.lang.python Subject: Re: Pyhon 2.x or 3.x, which is faster? Date: Tue, 8 Mar 2016 14:48:46 +0200 Lines: 15 Message-ID: References: <87d1r6iltx.fsf@elektro.pacujo.net> <56de3513$0$1621$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 YYnfVk/hLkfffaMWt1fXoQChJ6RWnicWDC+xVJ6c7ZDQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:which': 0.09; 'question.': 0.13; "'from": 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'there?': 0.16; 'wrote:': 0.16; 'versions': 0.20; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; "skip:' 10": 0.28; '100000': 0.29; "d'aprano": 0.33; 'steven': 0.33; 'happened': 0.35; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'skip:p 20': 0.38; 'to:addr:python.org': 0.40; 'per': 0.62; 'charset:windows-1252': 0.62; 'times': 0.63; '10000': 0.66; '3.6': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 193.202.118.160 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <56de3513$0$1621$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:104332 On 08.03.16 04:12, Steven D'Aprano wrote: > [steve@ando ~]$ python3.3 -m timeit -s 'from fp import > Float' 'Float("1234.567")' > 100000 loops, best of 3: 13.6 usec per loop > > [steve@ando ~]$ python/python-dev/3.5/python -m timeit -s 'from fp import > Float' 'Float("1234.567")' > 10000 loops, best of 3: 54 usec per loop > > What about 3.5? That's four times slower than 3.3? What happened there? This is interesting question. On my computer (32-bit) all versions from 3.3 to 3.6 have the same performance in this microbenchmark.