Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; '(all': 0.07; 'linux,': 0.07; 'paths': 0.07; 'versions.': 0.07; 'string': 0.09; 'meaningful': 0.09; 'used.': 0.09; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'range.': 0.16; 'sorting': 0.16; 'sorts': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'sort': 0.25; 'subject:/': 0.26; 'header:In-Reply- To:1': 0.27; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; 'went': 0.31; "skip:' 10": 0.31; '3.2': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; 'probably': 0.32; "we're": 0.32; 'actual': 0.34; "i'd": 0.34; 'received:google.com': 0.35; 'there': 0.35; 'curious': 0.36; 'seconds': 0.37; 'two': 0.37; 'list': 0.37; 'performance': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'skip:n 10': 0.64; 'confirm': 0.64; 'laptop': 0.65; 'talking': 0.65; 'between': 0.67; 'million': 0.74; 'difference.': 0.84; 'subject:long': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=KT7HuohDdSCI7M1lNnvHn0az1Z80OeY573nGaVp4CX4=; b=Qp+P2PBnvl4KNkL4sAbIyIV6hLbBaPfjFWGKzY0b3Wp2rqGlSdGTojgDbpp0Z1q0F9 Yw2UOwWNTt7J9C81XmJtZfw2Kao6rJmyE4asmPIKYzHAdHi5wYZXSO9v2vMtfl9B466n G5CKWBj1w3zzmlXYnF/buyoiq1FkcIiYPy2w6IckHIjhbIFIw1YaYAAeu+URxFDJ05Pz K8UNMDwcliV4ZYtfjWKDF8pH4QBijiK+yT14JhTwQM+yHMt0WtwO90AGnNzWQ8MR5UWL 5S0RGPi/7SjEC941JP1pkvhtS0C0ZXy+ZAKEKM3WscU6cs9pmxgPL6oJJ9QFjCmXJNAS dRTQ== MIME-Version: 1.0 X-Received: by 10.52.16.211 with SMTP id i19mr200631vdd.91.1364970337569; Tue, 02 Apr 2013 23:25:37 -0700 (PDT) In-Reply-To: <515bbedb$0$29891$c3e8da3$5496439d@news.astraweb.com> 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> Date: Wed, 3 Apr 2013 17:25:37 +1100 Subject: Re: Performance of int/long in Python 3 From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364970346 news.xs4all.nl 6961 [2001:888:2000:d::a6]:46616 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42633 On Wed, Apr 3, 2013 at 4:32 PM, 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. > > 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'd be curious to know the sorts of characters used. Given that it's probably a narrow-vs-wide Python difference we're talking here, the actual distribution of codepoints may well make a difference. ChrisA