Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.044 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'mrab': 0.05; 'string': 0.09; 'ascii': 0.09; 'cursor': 0.09; 'insertion': 0.09; 'so?': 0.09; 'typed': 0.09; 'python': 0.11; '18:13,': 0.16; 'buffer.': 0.16; 'cons': 0.16; 'discussion?': 0.16; 'implies': 0.16; 'language': 0.16; 'wrote:': 0.18; 'trying': 0.19; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'char': 0.24; 'sorry,': 0.24; 'header :In-Reply-To:1': 0.27; 'idea': 0.28; 'point': 0.28; 'on,': 0.29; 'characters': 0.30; 'waste': 0.30; '>>>>': 0.31; 'editor': 0.35; 'there': 0.35; 'example,': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'bad': 0.39; 'structure': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'around.': 0.60; 'new': 0.61; 'simple': 0.61; 'you.': 0.62; 'making': 0.63; 'email addr:gmail.com': 0.63; 'show': 0.63; 'soon': 0.63; 'charset:windows-1252': 0.65; 'pro': 0.69; '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=rqGyOlGLbSY2hkSry4SakulAe9BUFgoUIJKdYM5i5lA= c=1 sm=2 a=a21qFd9_iNQA:10 a=N659UExz7-8A:10 a=pGLkceISAAAA:8 a=5rI8-UjkB9OUfIvdE4IA:9 a=pILNOxqGKmIA:10 a=MSl-tDqOz04A:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBALAC+FFbtq+i/2dsb2JhbAANTsIhgTSDGAEBAQQyAQUxAQ4RCxgJFg8JAwIBAgEPNhMGAgKHegOmGYlmDVeIB40NgngWg3MDlXaBaYwmiDw Date: Tue, 30 Jul 2013 20:19:02 +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: <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> <51F7EC41.5010704@rece.vub.ac.be> <51F7F48F.3070803@mrabarnett.plus.com> In-Reply-To: <51F7F48F.3070803@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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375208411 news.xs4all.nl 16001 [2001:888:2000:d::a6]:47054 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51594 Op 30-07-13 19:14, MRAB schreef: > On 30/07/2013 17:39, Antoon Pardon wrote: >> 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. >> > The disadvantage there is that when you move the cursor you must move > characters around. For example, what if the cursor was at the start and > you wanted to move it to the end? Also, when the gap has been filled, > you need to make a new one. So? Why are you making this a point of discussion? I was not aware that the pro and cons of various editor buffer implemantations was relevant to the point I was trying to make. If you prefer an other data structure in the editor you are working on, I will not dissuade you. -- Antoon Pardon