Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'test,': 0.07; '"if': 0.09; 'ascii': 0.09; 'subject:trying': 0.09; 'runs': 0.10; 'cc:addr :python-list': 0.11; 'python': 0.11; '-tkc': 0.16; '127': 0.16; 'devs': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'only)': 0.16; 'subject:non': 0.16; 'wrote:': 0.18; 'normally': 0.19; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'characters': 0.30; 'purely': 0.31; 'core': 0.34; 'but': 0.35; 'half': 0.37; 'seconds': 0.37; 'awesome': 0.38; 'email addr:gmail.com': 0.63; 'to:addr:gmail.com': 0.65; 'reads': 0.68; 'received:50.22': 0.84; 'subject:.. ': 0.84 Date: Tue, 29 Oct 2013 10:52:49 -0500 From: Tim Chase To: wxjmfauth@gmail.com Subject: Re: trying to strip out non ascii.. or rather convert non ascii In-Reply-To: <63fa9fcd-6445-41ee-8873-e1ee046e2031@googlegroups.com> References: <526c412a$0$29972$c3e8da3$5496439d@news.astraweb.com> <526f4612$0$6512$c3e8da3$5496439d@news.astraweb.com> <63fa9fcd-6445-41ee-8873-e1ee046e2031@googlegroups.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com 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: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383061878 news.xs4all.nl 15910 [2001:888:2000:d::a6]:41618 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57924 On 2013-10-29 08:38, wxjmfauth@gmail.com wrote: > >>> import timeit > >>> timeit.timeit("a =3D 'hundred'; 'x' in a") =20 > 0.12621293837694095 > >>> timeit.timeit("a =3D 'hundre=C4=B3'; 'x' in a") =20 > 0.26411553466961735 That reads to me as "If things were purely UCS4 internally, Python would normally take 0.264... seconds to execute this test, but core devs managed to optimize a particular (lower 127 ASCII characters only) case so that it runs in less than half the time." Is this not what you intended to demonstrate? 'cuz that sounds like a pretty awesome optimization to me. -tkc