Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'exception': 0.03; 'python': 0.09; 'behave': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'subject:python': 0.11; '3.2.': 0.16; '3.3.': 0.16; 'comparison.': 0.16; 'devs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:3.3': 0.16; 'subject:String': 0.16; 'later': 0.16; 'string': 0.17; 'wrote:': 0.17; 'bytes': 0.17; 'unicode': 0.17; 'jan': 0.18; '3.2': 0.22; 'please?': 0.22; 'nearly': 0.23; 'machine': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; '2.6': 0.27; 'functions.': 0.27; 'operations,': 0.27; 'header:X-Complaints- To:1': 0.28; 'chris': 0.28; 'run': 0.28; 'selecting': 0.29; 'expect': 0.31; 'to:addr:python-list': 0.33; 'faster': 0.35; 'received:org': 0.36; 'but': 0.36; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'space': 0.39; 'header:Received:5': 0.40; 'show': 0.63; 'confirm': 0.64; 'covers': 0.65; 'today': 0.67; 'received:fios.verizon.net': 0.84; 'notable': 0.91; 'rusi': 0.91; 'overall,': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: String performance regression from python 3.2 to 3.3 Date: Thu, 14 Mar 2013 19:14:32 -0400 References: <23a42297-9262-4ace-87ad-138999b1ddd6@z3g2000vbg.googlegroups.com> <51411F38.1040901@mrabarnett.plus.com> <51414c75$0$29965$c3e8da3$5496439d@news.astraweb.com> <7cd57e96-663b-4a3b-a2c8-2fdbf730fa9b@hd10g2000pbc.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; 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: <7cd57e96-663b-4a3b-a2c8-2fdbf730fa9b@hd10g2000pbc.googlegroups.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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363302886 news.xs4all.nl 6969 [2001:888:2000:d::a6]:57263 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41250 On 3/14/2013 6:48 AM, rusi wrote: > On Mar 14, 11:47 am, Chris Angelico wrote: > >> I expect that Python 3.2 will behave comparably to the 2.6 stats, but >> I don't have 3.2s handy - can someone confirm please? > > I have 3.2 but not 3.3. Can run it later today if no one does. > But better if someone with both on the same machine do the comparison. The python devs use the microbenchmarks in Tools/stringbench/stringbench.py, which covers all string operations, as the basis for improving particular string functions. Overall, Unicode is nearly as fast as bytes and 3.3 as fast as 3.2. Find/replace is the notable exception in stringbench, so it is an anomaly. Other things are faster in 3.3. In selecting the new implementation, the devs also considered space and speed gains that do not show up in microbenchmarks. -- Terry Jan Reedy