Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.080 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.01; 'mrab': 0.05; 'string': 0.09; 'ascii': 0.09; 'insertion': 0.09; 'typed': 0.09; 'python': 0.11; '18:13,': 0.16; 'buffer.': 0.16; 'implies': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'header:User- Agent:1': 0.23; 'char': 0.24; 'sorry,': 0.24; 'header:In-Reply- To:1': 0.27; 'idea': 0.28; 'characters': 0.30; 'waste': 0.30; 'editor': 0.35; 'to:addr:python-list': 0.38; 'does': 0.39; 'bad': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'new': 0.61; 'simple': 0.61; 'email addr:gmail.com': 0.63; 'show': 0.63; 'soon': 0.63; 'charset:windows-1252': 0.65; 'characters,': 0.84; 'gap': 0.84; 'pardon': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=JwSGNjbGnP6MiMcLyKrNpWmIc1yUw283QYpddUogNbc= c=1 sm=2 a=a21qFd9_iNQA:10 a=N659UExz7-8A:10 a=pGLkceISAAAA:8 a=717pqp0PSpz_Tr3YQ4kA:9 a=pILNOxqGKmIA:10 a=MSl-tDqOz04A:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwBAMTq91Fbtq+i/2dsb2JhbAANToZUu0qBNIMYAQEBBDIBBTEBDhELGAkWDwkDAgECAQ82EwYCAod6A6YViWUNV4gHjQ2CeBaDcwOVdoFpjCaIPA Date: Tue, 30 Jul 2013 18:39:29 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130704 Icedove/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: RE Module Performance References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51f14395$0$29971$c3e8da3$5496439d@news.astraweb.com> <51f15e03$0$29971$c3e8da3$5496439d@news.astraweb.com> <8203e802-9dc5-44c5-9547-6e1947ee224b@googlegroups.com> <43ce1b65-9d6d-47dd-b209-9a3bbafc0b8c@googlegroups.com> <51F7CFD1.1090403@rece.vub.ac.be> <51F7E634.2030200@mrabarnett.plus.com> In-Reply-To: <51F7E634.2030200@mrabarnett.plus.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375202438 news.xs4all.nl 15881 [2001:888:2000:d::a6]:58748 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51581 Op 30-07-13 18:13, MRAB schreef: > On 30/07/2013 15:38, Antoon Pardon wrote: >> Op 30-07-13 16:01, wxjmfauth@gmail.com schreef: >>> >>> I am pretty sure that once you have typed your 127504 ascii >>> characters, you are very happy the buffer of your editor does not >>> waste time in reencoding the buffer as soon as you enter an €, the >>> 125505th char. Sorry, I wanted to say z instead of euro, just to >>> show that backspacing the last char and reentering a new char >>> implies twice a reencoding. >> >> Using a single string as an editor buffer is a bad idea in python for >> the simple reason that strings are immutable. > > Using a single string as an editor buffer is a bad idea in _any_ > language because an insertion would require all the following > characters to be moved. Not if you use a gap buffer. -- Antoon Pardon.