Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'python3': 0.05; 'python': 0.09; 'regression': 0.09; 'sep': 0.09; 'skip:r 50': 0.09; 'skip:r 60': 0.09; 'skip:t 60': 0.09; 'skip:t 70': 0.09; 'subject:python': 0.11; '2.7': 0.13; '2.7.3': 0.16; 'subject:3.3': 0.16; 'subject:String': 0.16; 'string': 0.17; 'examples': 0.18; 'jan': 0.18; 'shell': 0.18; '>>>': 0.18; 'feb': 0.19; 'to:name:python-list@python.org': 0.20; 'skip:- 40': 0.21; 'import': 0.21; '3.2': 0.22; 'to:2**1': 0.23; 'linux': 0.24; 'header:In-Reply-To:1': 0.25; 'skip:[ 10': 0.26; 'chris': 0.28; 'date:': 0.29; 'url:mailman': 0.29; 'fri,': 0.30; 'url:python': 0.32; 'url:listinfo': 0.32; 'from:addr:live.com': 0.33; 'to:addr :python-list': 0.33; 'skip:- 20': 0.34; 'subject:': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'subject:: ': 0.38; 'from:': 0.38; 'performance': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'email name:python-list': 0.62; 'repeat': 0.62; 'email addr:gmail.com': 0.63; 'more': 0.63; 'results': 0.65; '2013': 0.84; 'charset:windows-1251': 0.97 X-EIP: [1+gBKx6dYL2b2UJlzwEeZwcfPI5s5etL] X-Originating-Email: [andriy.kornatskyy@live.com] From: Andriy Kornatskyy To: rusi , "python-list@python.org" Subject: RE: String performance regression from python 3.2 to 3.3 Date: Fri, 15 Mar 2013 21:04:24 +0300 Importance: Normal In-Reply-To: <4eb54568-3135-4e81-9784-ff3ed989916b@mz7g2000pbb.googlegroups.com> 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>, <4eb54568-3135-4e81-9784-ff3ed989916b@mz7g2000pbb.googlegroups.com> Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 15 Mar 2013 18:04:24.0326 (UTC) FILETIME=[86B00260:01CE21A7] 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: 112 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363370733 news.xs4all.nl 6924 [2001:888:2000:d::a6]:49027 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41285 $ python3.2=0A= Python 3.2.3 (default=2C Jun 25 2012=2C 22:55:05)=A0=0A= [GCC 4.6.3] on linux2=0A= Type "help"=2C "copyright"=2C "credits" or "license" for more information.= =0A= >>> from timeit import repeat=0A= >>> repeat("s=3Ds[:-1]+'\u0034'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)=0A= [0.2566258907318115=2C 0.14485502243041992=2C 0.14464998245239258]=0A= >>> repeat("s=3Ds[:-1]+'\u1234'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)=0A= [0.25584888458251953=2C 0.1340939998626709=2C 0.1338820457458496]=0A= >>> repeat("s=3Ds[:-1]+'\u1234'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D10000= )=0A= [0.2571289539337158=2C 0.13403892517089844=2C 0.13388800621032715]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= [0.5022759437561035=2C 0.3970041275024414=2C 0.3764481544494629]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D1= 0000)=0A= [0.5213770866394043=2C 0.38585615158081055=2C 0.40251588821411133]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\U00012345sdf'*10000"=2Cnumber= =3D10000)=0A= [0.768744945526123=2C 0.5852570533752441=2C 0.6029140949249268]=0A= =0A= $ python3.3=0A= Python 3.3.0 (default=2C Sep 29 2012=2C 15:35:49)=A0=0A= [GCC 4.7.1] on linux=0A= Type "help"=2C "copyright"=2C "credits" or "license" for more information.= =0A= >>> from timeit import repeat=0A= >>> repeat("s=3Ds[:-1]+'\u0034'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)=0A= [0.0985728640225716=2C 0.0984080360212829=2C 0.07457763599813916]=0A= >>> repeat("s=3Ds[:-1]+'\u1234'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)=0A= [0.901988381985575=2C 0.7517840950167738=2C 0.7540924890199676]=0A= >>> repeat("s=3Ds[:-1]+'\u1234'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D10000= )=0A= [0.3069786810083315=2C 0.17701858800137416=2C 0.1769046070112381]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= [1.081760977016529=2C 0.9099628589756321=2C 0.9926943230093457]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D1= 0000)=0A= [1.2101859120011795=2C 1.1039280130062252=2C 0.9306247030035593]=0A= >>> repeat("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\U00012345sdf'*10000"=2Cnumber= =3D10000)=0A= [0.4759294819959905=2C 0.35435649199644104=2C 0.3540659479913302]=0A= =0A= =0A= ----------------------------------------=0A= > Date: Fri=2C 15 Mar 2013 10:07:48 -0700=0A= > Subject: Re: String performance regression from python 3.2 to 3.3=0A= > From: rustompmody@gmail.com=0A= > To: python-list@python.org=0A= >=0A= > 3.2 and 2.7 results on my desktop using Chris examples=0A= > (Hope I cut-pasted them correctly)=0A= > -----------------------------=0A= > Welcome to the Emacs shell=0A= >=0A= > ~ $ python3=0A= > Python 3.2.3 (default=2C Feb 20 2013=2C 17:02:41)=0A= > [GCC 4.7.2] on linux2=0A= > Type "help"=2C "copyright"=2C "credits" or "license" for more information= .=0A= > >>> from timeit import timeit=0A= > >>> timeit("s=3Ds[:-1]+'\u0034'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= > 0.2893378734588623=0A= > >>> timeit("s=3Ds[:-1]+'\u1234'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= > 0.2842249870300293=0A= >=0A= > >>> timeit("s=3Ds[:-1]+'\u1234'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D100= 00)=0A= > 0.28406381607055664=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'asdf'*10000"=2Cnumber=3D1000= 0)=0A= > 0.28420209884643555=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber= =3D10000)=0A= > 0.2853250503540039=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\U00012345sdf'*10000"=2Cnumb= er=3D10000)=0A= > 0.283905029296875=0A= > >>>=0A= >=0A= > ~ $ python=0A= > Python 2.7.3 (default=2C Jan 2 2013=2C 16:53:07)=0A= > [GCC 4.7.2] on linux2=0A= > Type "help"=2C "copyright"=2C "credits" or "license" for more information= .=0A= > >>> from timeit import timeit=0A= > >>> timeit("s=3Ds[:-1]+'\u0034'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= > 0.20418286323547363=0A= > >>> timeit("s=3Ds[:-1]+'\u1234'"=2C"s=3D'asdf'*10000"=2Cnumber=3D10000)= =0A= >=0A= > 0.20579099655151367=0A= > >>> timeit("s=3Ds[:-1]+'\u1234'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber=3D100= 00)=0A= > 0.5055279731750488=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'asdf'*10000"=2Cnumber=3D1000= 0)=0A= > 0.28449511528015137=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\u1234sdf'*10000"=2Cnumber= =3D10000)=0A= > 0.6001529693603516=0A= > >>> timeit("s=3Ds[:-1]+'\U00012345'"=2C"s=3D'\U00012345sdf'*10000"=2Cnumb= er=3D10000)=0A= > 0.8430721759796143=0A= > --=0A= > http://mail.python.org/mailman/listinfo/python-list =