Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feed.xsnews.nl!border-1.ams.xsnews.nl!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed6.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.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; '3.2.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:unicode': 0.16; 'wchar_t': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'memory': 0.18; 'windows': 0.19; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; '20%': 0.29; 'this.': 0.29; 'builds': 0.33; 'to:addr:python-list': 0.33; '(with': 0.33; "can't": 0.34; 'text': 0.34; 'there': 0.35; 'received:org': 0.36; 'should': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'received:46': 0.60; 'subject:, ': 0.61; 'wide': 0.62; 'subject:...': 0.63; 'email addr:gmail.com': 0.63; 'confirm': 0.64; 'gain': 0.79; 'inevitable': 0.84; 'otten': 0.84; 'subject:, ...': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Serhiy Storchaka Subject: Re: Flexible string representation, unicode, typography, ... Date: Mon, 03 Sep 2012 18:56:50 +0300 References: <2e92da71-fbd2-467f-9088-1c79fa7bcf69@googlegroups.com> <62566024-df1d-4948-a27a-45c7820ddc6c@googlegroups.com> <503f0e45$0$9416$c3e8da3$76491128@news.astraweb.com> <2a12ba52-232a-41b7-a906-1ec379bbddd7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 46.185.98.182 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 In-Reply-To: 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346687830 news.xs4all.nl 6964 [2001:888:2000:d::a6]:34469 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28361 On 03.09.12 09:15, Peter Otten wrote: > wxjmfauth@gmail.com wrote: >> Le dimanche 2 septembre 2012 14:01:18 UTC+2, Serhiy Storchaka a écrit : > >>> Hmm, and with locale.strxfrm Python 3.3 20% slower than 3.2. >> >> With a memory gain = 0 since my text contains non-latin-1 characters! > > I can't confirm this. At least users of wide builds will see a decrease in > memory use: And only users of wide builds will see a 20% decrease in speed for this data (with longer strings Python 3.3 will outstrip Python 3.2). This happens because of the inevitable transformation UCS2 -> wchar_t and wchar_t -> UCS2 on platform with 4-bytes wchar_t. On Windows there should be no slowing down.