Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'skip:[ 20': 0.03; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'attempt.': 0.16; 'cp1252': 0.16; 'idle,': 0.16; 'luckily,': 0.16; 'pentium': 0.16; 'subject:Big': 0.16; '>>>': 0.18; 'windows': 0.19; 'skip:" 30': 0.20; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'coding': 0.27; 'core': 0.27; '100000': 0.29; '7.0': 0.29; 'ram': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'characters': 0.36; 'skip:t 40': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'from:no real name:2**0': 0.60; 'first': 0.61; 'chance': 0.61; 'charset:windows-1252': 0.65; '8bit%:10': 0.69; 'pro': 0.69; 'received:209.85.216.184': 0.84; 'subject:Abuse': 0.84 Newsgroups: comp.lang.python Date: Mon, 20 Aug 2012 11:42:48 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.78.170.117; posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_ References: <308df2af-abe7-4043-b199-0a39f440e0ab@googlegroups.com> <502f8a2a$0$29978$c3e8da3$5496439d@news.astraweb.com> <7xehn4vyya.fsf@ruckus.brouhaha.com> <5030832d$0$29978$c3e8da3$5496439d@news.astraweb.com> <7x8vdbmho6.fsf@ruckus.brouhaha.com> <7xfw7ilqnd.fsf@ruckus.brouhaha.com> <50314968$0$29978$c3e8da3$5496439d@news.astraweb.com> <7xwr0ua1pw.fsf@ruckus.brouhaha.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 83.78.170.117 MIME-Version: 1.0 Subject: Re: Abuse of Big Oh notation From: wxjmfauth@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345488171 news.xs4all.nl 6845 [2001:888:2000:d::a6]:40186 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27525 By chance and luckily, first attempt. IDLE, Windows 7.0 Pro 32, Pentium Dual Core 2.6, RAM 2 Go Py 3.2.3 >>> timeit.repeat("('=80'*100+'=80'*100).replace('=80', '=9C')") [1.6939567134893707, 1.672874290786993, 1.6761219212298073] Py 3.3.0b2 >>> timeit.repeat("('=80'*100+'=80'*100).replace('=80', '=9C')") [7.924470733910917, 7.8554985620787345, 7.878623849091914] Console c:\python32\python -m timeit "('=80'*100+'=80'*100).replace('=80' , '=9C')" 1000000 loops, best of 3: 1.48 usec per loop c:\python33\python -m timeit "('=80'*100+'=80'*100).replace('=80' , '=9C')" 100000 loops, best of 3: 7.62 usec per loop Note The used characters are not members of the latin-1 coding scheme (btw an *unusable* coding). They are however charaters in cp1252 and mac-roman. jmf