<div dir="ltr">On 31 July 2013 00:01, <span dir="ltr"><<a href="mailto:wxjmfauth@gmail.com" target="_blank">wxjmfauth@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br></div>
I am pretty sure that once you have typed your 127504<br>
ascii characters, you are very happy the buffer of your<br>
editor does not waste time in reencoding the buffer as<br>
soon as you enter an €, the 125505th char. Sorry, I wanted<br>
to say z instead of euro, just to show that backspacing the<br>
last char and reentering a new char implies twice a reencoding.<br></blockquote><div><br></div><div><div>And here we come to the root of your complete misunderstanding and</div><div>mischaracterisation of the FSR. You don't appear to understand that</div>
<div>strings in Python are immutable and that to add a character to an</div><div>existing string requires copying the entire string + new character. In</div><div>your hypothetical situation above, you have already performed 127504</div>
<div>copy + new character operations before you ever get to a single widening</div><div>operation. The overhead of the copy + new character repeated 127504</div><div>times dwarfs the overhead of a single widening operation.</div>
<div><br></div><div>Given your misunderstanding, it's no surprise that you are focused on</div><div>microbenchmarks that demonstrate that copying entire strings and adding</div><div>a character can be slower in some situations than others. When the only</div>
<div>use case you have is implementing the buffer of an editor using an</div><div>immutable string I can fully understand why you would be concerned about</div><div>the performance of adding and removing individual characters. However,</div>
<div>in that case *you're focused on the wrong problem*.</div><div><br></div><div>Until you can demonstrate an understanding that doing the above in any</div><div>language which has immutable strings is completely insane you will have</div>
<div>no credibility and the only interest anyone will pay to your posts is</div><div>refuting your FUD so that people new to the language are not driven off</div><div>by you.</div></div><div><br></div><div>Tim Delaney </div>
</div></div></div>