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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'exception': 0.03; 'subject:Python': 0.05; 'raised': 0.07; 'agree,': 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; '3.2.': 0.16; '3.3.': 0.16; 'claims,': 0.16; 'crud': 0.16; 'did,': 0.16; 'operation.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'terribly': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'unicode': 0.17; '(in': 0.18; 'jan': 0.18; '3.2': 0.22; 'nearly': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'am,': 0.27; 'replace': 0.27; 'header:X-Complaints-To:1': 0.28; 'actual': 0.28; "d'aprano": 0.29; 'dramatic': 0.29; 'steven': 0.29; 'not.': 0.32; 'running': 0.32; 'getting': 0.33; 'asked': 0.33; 'problem': 0.33; 'anyone': 0.33; 'to:addr:python-list': 0.33; 'faster': 0.35; 'similar': 0.35; 'something': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'should': 0.36; 'possible': 0.37; 'reported': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'things': 0.38; 'performance': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'think': 0.40; 'your': 0.60; 'real': 0.61; 'times': 0.63; 'skip:n 10': 0.63; 'confirm': 0.64; 'results': 0.65; 'consequences': 0.71; 'attention': 0.75; 'hit.': 0.84; 'received:fios.verizon.net': 0.84; 'victor': 0.84; 'notable': 0.91; 'results,': 0.91; 'overall,': 0.93; 'serious': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Article on the future of Python Date: Thu, 27 Sep 2012 15:08:50 -0400 References: <5062ad83$0$29997$c3e8da3$5496439d@news.astraweb.com> <693ac61b-b1d3-4192-9e50-5166fd119278@googlegroups.com> <447851a9-bc63-4711-a4e6-bff565e28f1f@googlegroups.com> <2b2d20f5-2807-4a61-b284-8075e900db22@googlegroups.com> <50641d6d$0$29997$c3e8da3$5496439d@news.astraweb.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:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <50641d6d$0$29997$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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348772964 news.xs4all.nl 6904 [2001:888:2000:d::a6]:55058 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30321 On 9/27/2012 5:33 AM, Steven D'Aprano wrote: > Nevertheless, I think there is something here. The consequences are nowhere > near as dramatic as jmf claims, but it does seem that replace() has taken a > serious performance hit. Perhaps it is unavoidable, but perhaps not. > > If anyone else can confirm similar results, I already did, about a month ago, for windows. I think the actual problem is with find, not replace (which does a find before the replace). When I asked on pydev, Victor Stinner had no explanation, but said he might look into it eventually. Others thought it not terribly important since 7 times blazingly fast is still fast (in your example, 29 versus 3 microseconds per operation. jmf wrapping a possible real issue with anti-3.3 crud did not help in getting attention to the regression. I also reported results of running stringbench.py on both 3.2 and 3.3 on windows. 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. > I think this should be raised as a performance regression. I agree, and Mark did it. -- Terry Jan Reedy