Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'python': 0.09; 'lawrence': 0.09; 'skip:k 40': 0.09; 'subject:string': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; '3.2.': 0.16; 'instead:': 0.16; 'rewriting': 0.16; 'subject:unicode': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'cc:2**0': 0.23; 'example': 0.23; 'cc:no real name:2**0': 0.24; 'machine': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'run': 0.28; '20%': 0.29; "i'm": 0.29; 'code': 0.31; 'times.': 0.33; 'received:google.com': 0.34; 'fastest': 0.35; 'received:209.85': 0.35; 'there': 0.35; "i'll": 0.36; 'possible': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'subject:, ': 0.61; 'subject:...': 0.63; 'otten': 0.84; 'subject:, ...': 0.84 Newsgroups: comp.lang.python Date: Sun, 2 Sep 2012 06:48:59 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.167.124.133; posting-account=uPFZNQoAAAAm9w7z13q1SjWNKNjztdcD References: <503a8361$0$6574$c3e8da3$5496439d@news.astraweb.com> <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> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 122.167.124.133 MIME-Version: 1.0 Subject: Re: Flexible string representation, unicode, typography, ... From: Ramchandra Apte To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: , Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346593749 news.xs4all.nl 6916 [2001:888:2000:d::a6]:35725 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28273 On Sunday, 2 September 2012 17:53:16 UTC+5:30, Mark Lawrence wrote: > On 02/09/2012 13:00, Serhiy Storchaka wrote: > > > On 02.09.12 12:52, Peter Otten wrote: > > >> Ian Kelly wrote: > > >> > > >>> Rewriting the example to use locale.strcoll instead: > > >> > > >>>>>> sorted(li, key=functools.cmp_to_key(locale.strcoll)) > > >> > > >> There is also locale.strxfrm() which you can use directly: > > >> > > >> sorted(li, key=locale.strxfrm) > > > > > > Hmm, and with locale.strxfrm Python 3.3 20% slower than 3.2. > > > > > > > > > > That's it then I'm giving up with Python. In future I'll be writing > > everything in machine code to ensure that I get the fastest possible run > > times. > > > > -- > > Cheers. > > > > Mark Lawrence. please make it *heavily optimized* machine code