RE Module Performance

Joshua Landau joshua at landau.ws
Tue Jul 30 19:40:17 CEST 2013


On 30 July 2013 17:39, Antoon Pardon <antoon.pardon at rece.vub.ac.be> 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 at 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.


Additionally, who says a language couldn't use, say, B-Trees for all of its
list-like types, including strings?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130730/f74d4e14/attachment.html>


More information about the Python-list mailing list