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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'space.': 0.07; 'python': 0.09; 'lawrence': 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:python': 0.11; 'sat,': 0.15; 'chris,': 0.16; 'ignores': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'relates': 0.16; 'subject:3.3': 0.16; 'subject:String': 0.16; 'sure.': 0.16; 'twice.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'script.': 0.17; 'unicode': 0.17; '>>>': 0.18; '3.2': 0.22; "python's": 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'implemented': 0.27; 'header:X -Complaints-To:1': 0.28; 'chris': 0.28; '>>>>': 0.29; 'exposed': 0.29; 'loads': 0.29; 'once.': 0.29; 'character': 0.29; 'words': 0.29; "skip:' 10": 0.30; 'stuff': 0.30; 'from:addr:yahoo.co.uk': 0.32; 'version:': 0.33; 'to:addr:python-list': 0.33; 'know.': 0.33; 'done': 0.34; 'pm,': 0.35; 'received:org': 0.36; 'explain': 0.36; 'but': 0.36; 'characters': 0.36; 'enough': 0.36; 'two': 0.37; 'uses': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'brief': 0.38; 'store': 0.38; 'possible.': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'easily': 0.39; 'header:Received:5': 0.40; 'lost': 0.60; "you've": 0.61; 'kind': 0.61; 'wide': 0.62; 'thomas': 0.62; 'here': 0.65; 'stated': 0.69; 'counts': 0.81; '2013': 0.84; 'about?': 0.84; 'choices.': 0.84; 'framing': 0.84; 'rusi': 0.91; 'trades': 0.91; 'favour': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: String performance regression from python 3.2 to 3.3 Date: Sat, 16 Mar 2013 04:56:41 +0000 References: <23a42297-9262-4ace-87ad-138999b1ddd6@z3g2000vbg.googlegroups.com> <2992273.neLn1eVAPo@PointedEars.de> <2202673.rtQqbKup0V@PointedEars.de> <8b4723a3-b2dd-4b31-84ca-261483842f69@y7g2000pbu.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-18-20-125.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <8b4723a3-b2dd-4b31-84ca-261483842f69@y7g2000pbu.googlegroups.com> X-Antivirus: avast! (VPS 130311-2, 11/03/2013), Outbound message X-Antivirus-Status: Clean 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363409641 news.xs4all.nl 6893 [2001:888:2000:d::a6]:46658 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41297 On 16/03/2013 04:35, rusi wrote: > On Mar 16, 9:09 am, Chris Angelico wrote: >> On Sat, Mar 16, 2013 at 2:56 PM, Mark Lawrence wrote: >>> On 16/03/2013 02:44, Thomas 'PointedEars' Lahn wrote: >> >>>> Chris Angelico wrote: >> >>> Thomas and Chris, would the two of you be kind enough to explain to morons >>> such as myself how all the ECMAScript stuff relates to Python's unicode as >>> implemented via PEP 393 as you've lost me, easily done I know. >> >> Sure. Here's the brief version: It's all about how a string is exposed >> to a script. >> >> * Python 3.2 Narrow gives you UTF-16. Non-BMP characters count twice. >> * Python 3.2 Wide gives you UTF-32. Each character counts once. >> * Python 3.3 gives you UTF-32, but will store it as compactly as possible. > > Framing issue here (made famous by en.wikipedia.org/wiki/ > George_Lakoff) > > When one uses words like 'compact' 'flexible' etc it loads the dice in > favour of 3.3 choices. > And ignores that 3.3 trades time for space. > As stated in PEP 393 so what's all the fuss about? -- Cheers. Mark Lawrence