Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feed.xsnews.nl!border-1.ams.xsnews.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:How': 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; 'subject:string': 0.09; 'subject:using': 0.09; 'terry': 0.09; "'my": 0.16; 'a",': 0.16; 'opposite': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'repetitions': 0.16; 'subject: \n ': 0.16; 'subject:unicode': 0.16; 'subject:variable': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'operations.': 0.22; 'thus': 0.24; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints- To:1': 0.28; 'loop,': 0.29; "skip:' 10": 0.30; 'sense': 0.31; 'to:addr:python-list': 0.33; 'list': 0.35; 'pm,': 0.35; 'there': 0.35; 'received:org': 0.36; 'reported': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'gives': 0.39; 'performance': 0.39; 'system.': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'include:': 0.61; 'times': 0.63; 'making': 0.64; 'improvements': 0.65; 'real-world': 0.65; 'believe': 0.69; 'received:fios.verizon.net': 0.84; 'subject:value': 0.84; 'responses': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: How do I display unicode value stored in a string variable using ord() Date: Sat, 18 Aug 2012 23:12:50 -0400 References: <308df2af-abe7-4043-b199-0a39f440e0ab@googlegroups.com> <502f8a2a$0$29978$c3e8da3$5496439d@news.astraweb.com> <4c62a649-bc21-4e47-9c0f-acb1b1e70e36@googlegroups.com> 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:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345345997 news.xs4all.nl 6867 [2001:888:2000:d::a6]:53019 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27344 On 8/18/2012 4:09 PM, Terry Reedy wrote: > print(timeit("c in a", "c =3D '=E2=80=A6'; a =3D 'a'*1000+c")) > # .6 in 3.2.3, 1.2 in 3.3.0 > > This does not make sense to me and I will ask about it. I did ask on pydef list and paraphrased responses include: 1. 'My system gives opposite ratios.' 2. 'With a default of 1000000 repetitions in a loop, the reported times=20 are microseconds per operation and thus not practically significant.' 3. 'There is a stringbench.py with a large number of such micro benchmark= s.' I believe there are also whole-application benchmarks that try to mimic=20 real-world mixtures of operations. People making improvements must consider performance on multiple systems = and multiple benchmarks. If someone wants to work on search speed, they=20 cannot just optimize that one operation on one system. --=20 Terry Jan Reedy