Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'ascii': 0.07; 'enhancements': 0.09; 'ignoring': 0.09; 'patch.': 0.09; 'patches': 0.09; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:()': 0.09; 'terry': 0.09; 'worse': 0.09; 'bug': 0.10; 'stored': 0.10; 'language': 0.14; 'cases': 0.15; 'dec': 0.15; 'encoding': 0.15; '3.2,': 0.16; '3.2.': 0.16; '3.3.': 0.16; 'alpha,': 0.16; 'both.': 0.16; 'cares': 0.16; 'non-english': 0.16; 'obsessed': 0.16; 'operation,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'silly': 0.16; 'subject:3.3': 0.16; 'subject:unicode': 0.16; 'unfair': 0.16; 'utterly': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'bytes': 0.17; 'thu,': 0.17; 'unicode': 0.17; 'jan': 0.18; '>>>': 0.18; 'windows': 0.19; 'versions': 0.20; '3.2': 0.22; 'claimed': 0.22; 'fixing': 0.22; "i've": 0.23; 'least': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'common': 0.26; 'candidate': 0.26; 'am,': 0.27; 'bugs': 0.27; 'fixed': 0.28; 'header:X-Complaints-To:1': 0.28; 'actual': 0.28; 'chris': 0.28; '>>>>': 0.29; 'character.': 0.29; 'really,': 0.29; 'represented': 0.29; 'strings,': 0.29; 'thinks': 0.29; 'case,': 0.29; 'probably': 0.29; 'evaluation': 0.30; '(and': 0.32; 'cases,': 0.33; 'to:addr:python-list': 0.33; 'operations': 0.33; 'another': 0.33; 'that,': 0.34; 'done': 0.34; 'compared': 0.35; 'pm,': 0.35; 'there': 0.35; 'received:org': 0.36; 'characters': 0.36; 'test': 0.36; 'should': 0.36; 'enough': 0.36; 'optimization': 0.37; 'reported': 0.37; 'uses': 0.37; 'being': 0.37; 'why': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'fact': 0.38; 'several': 0.39; 'performance': 0.39; 'to:addr:python.org': 0.39; 'build': 0.39; 'space': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'most': 0.61; 'subject:, ': 0.61; 'containing': 0.61; 'times': 0.63; 'more': 0.63; '20,': 0.65; 'overall': 0.66; 'him,': 0.66; 'discovered': 0.83; 'all;': 0.84; 'complaint': 0.84; 'consequently': 0.84; 'moral': 0.84; 'received:fios.verizon.net': 0.84; 'substrings': 0.84; 'enhancement': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Py 3.3, unicode / upper() Date: Thu, 20 Dec 2012 00:32:42 -0500 References: <2adb4a25-8ea3-441f-b8c0-ee6c87e4b19f@googlegroups.com> <20121220031223.GB12012@Kubrick> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable 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/17.0 Thunderbird/17.0 In-Reply-To: <20121220031223.GB12012@Kubrick> 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: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355981588 news.xs4all.nl 6905 [2001:888:2000:d::a6]:51565 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35180 On 12/19/2012 10:12 PM, Westley Mart=C3=ADnez wrote: > On Wed, Dec 19, 2012 at 09:54:20PM -0500, Terry Reedy wrote: >> On 12/19/2012 9:03 PM, Chris Angelico wrote: >>> On Thu, Dec 20, 2012 at 5:27 AM, Ian Kelly wr= ote: >>>> From what I've been able to discern, [jmf's] actual complaint about= PEP >>>> 393 stems from misguided moral concerns. With PEP-393, strings that= >>>> can be fully represented in Latin-1 can be stored in half the space >>>> (ignoring fixed overhead) compared to strings containing at least on= e >>>> non-Latin-1 character. jmf thinks this optimization is unfair to >>>> non-English users and immoral; he wants Latin-1 strings to be treate= d >>>> exactly like non-Latin-1 strings (I don't think he actually cares >>>> about non-BMP strings at all; if narrow-build Unicode is good enough= >>>> for him, then it must be good enough for everybody). >>> >>> Not entirely; most of his complaints are based on performance (speed >>> and/or memory) of 3.3 compared to a narrow build of 3.2, using silly >>> edge cases to prove how much worse 3.3 is, while utterly ignoring the= >>> fact that, in those self-same edge cases, 3.2 is buggy. >> >> And the fact that stringbench.py is overall about as fast with 3.3 >> as with 3.2 *on the same Windows 7 machine* (which uses narrow build >> in 3.2), and that unicode operations are not far from bytes >> operations when the same thing can be done with both. >> >> -- >> Terry Jan Reedy > > Really, why should we be so obsessed with speed anyways? Isn't > improving the language and fixing bugs far more important? Being conservative, there are probably at least 10 enhancement patches=20 and 30 bug fix patches for every performance patch. Performance patches=20 are considered enhancements and only go in new versions with=20 enhancements, where they go through the extended alpha, beta, candidate=20 test and evaluation process. In the unicode case, Jim discovered that find was several times slower=20 in 3.3 than 3.2 and claimed that that was a reason to not use 3.2. I ran = the complete stringbency.py and discovered that find (and consequently=20 find and replace) are the only operations with such a slowdown. I also=20 discovered that another at least as common operation, encoding strings=20 that only contain ascii characters to ascii bytes for transmission, is=20 several times as fast in 3.3. So I reported that unless one is only=20 finding substrings in long strings, there is no reason to not upgrade to = 3.3. --=20 Terry Jan Reedy