Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; '(all': 0.07; 'compiler': 0.07; 'linux,': 0.07; 'paths': 0.07; 'versions.': 0.07; 'string': 0.09; 'meaningful': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'python': 0.11; 'windows': 0.15; 'guessing': 0.16; 'range.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'settings,': 0.16; 'sorting': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'options.': 0.19; 'header:User-Agent:1': 0.23; 'sort': 0.25; 'source': 0.25; 'compiled': 0.26; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'went': 0.31; "skip:' 10": 0.31; '3.2': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; "we're": 0.32; 'run': 0.32; "i'd": 0.34; 'there': 0.35; 'possible': 0.36; 'seconds': 0.37; 'two': 0.37; 'list': 0.37; 'performance': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'confirm': 0.64; 'more': 0.64; 'different': 0.65; '(that': 0.65; 'laptop': 0.65; 'between': 0.67; 'million': 0.74; '*and*': 0.84; 'difference.': 0.84; 'received:fios.verizon.net': 0.84; 'subject:long': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Jan Reedy Subject: Re: Performance of int/long in Python 3 Date: Wed, 03 Apr 2013 02:19:46 -0400 References: <6a146aba-a032-4aac-b2d3-7acedcebd804@q3g2000pbv.googlegroups.com> <515941d8$0$29967$c3e8da3$5496439d@news.astraweb.com> <5159beb6$0$29967$c3e8da3$5496439d@news.astraweb.com> <4103dc28-a0dc-4740-bb38-b6bcb58bedfb@h1g2000vbx.googlegroups.com> <87dff083-14d8-4163-89f3-d78a9be6c802@c15g2000vbl.googlegroups.com> <3qadncD4-6fcPsbMnZ2dnUVZ_rqdnZ2d@westnet.com.au> <515bbedb$0$29891$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <515bbedb$0$29891$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 1364970003 news.xs4all.nl 6888 [2001:888:2000:d::a6]:41187 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42631 On 4/3/2013 1:32 AM, Steven D'Aprano wrote: > On Wed, 03 Apr 2013 14:31:03 +1100, Neil Hodgson wrote: > >> Sorting a million string list (all the file paths on a particular >> computer) went from 0.4 seconds with Python 3.2 to 0.78 with 3.3 so >> we're out of the 'not noticeable by humans' range. Perhaps this is still >> a 'micro-benchmark' - I'd just like to avoid adding email access to get >> this over the threshold. What system *and* what compiler and compiler options. Unless 3.2 and 3.3 are both compiler with the same compiler and settings, we do not know the source of the difference. > I cannot confirm this performance regression. On my laptop (Debian Linux, > not Windows), I can sort a million file names in approximately 1.2 > seconds in both Python 3.2 and 3.3. There is no meaningful difference in > speed between the two versions. I am guessing that Neil's undisclosed system (that I can see) is Windows, since other benchmarks have been more different on Windows than on *nix. Given that we *know* that the 3.2 and 3.3 distribution are compiled with different compilers and run with different C runtimes, it is possible that some of the difference is from that and not from python at all. tjr