<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Sorry, I may have missed some earlier relevant parts of this
discussion.<br>
But you appear to be saying that you don't want to optimize
something because it would be hard to explain why it performed
better.<br>
Eh?? Have I misunderstood?<br>
Rob Cliffe<br>
<br>
<div class="moz-cite-prefix">On 05/10/2013 23:35, Raymond Hettinger
wrote:<br>
</div>
<blockquote
cite="mid:ACA0B1AB-680B-49F2-84F8-810ABB5383E8@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<br>
<div>
<div>On Oct 5, 2013, at 12:42 PM, Serhiy Storchaka <<a
moz-do-not-send="true" href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span style="font-family: Arial;
font-size: medium; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent:
0px; text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; display: inline !important;
float: none; ">Please remember me, what was common decision
about CPython-only optimizations which change computation
complexity?</span></blockquote>
</div>
<br>
<div>IIRC, it is okay optimize C code for just about anything, but
we don't</div>
<div>want to alter the pure python code after from idiomatic
solutions that</div>
<div>work on all of the implementations.</div>
<div><br>
</div>
<div>For example, there is a string concatenation optimization</div>
<div>in the C code, but we still use and advocate str.join()</div>
<div>and try not to write code that relies on the optimization.</div>
<div>That said, it is nice that less informed users are sometimes</div>
<div>saved from an accidental performance trap.</div>
<div><br>
</div>
<div>Making bytearray's efficiently pop from the left side is
dubious.</div>
<div>This isn't a common idiom, nor should it be. Even if all the</div>
<div>other implementations could model this behavior, it wouldn't</div>
<div>be a good idea to have bytearrays have different performance</div>
<div>characteristics than strings. Right now, it is not too hard
to</div>
<div>roughly explain the performance characteristics of the
various</div>
<div>container objects, but that would be imperiled a bit by
having</div>
<div>bytearrays differing from strings in ways other than their
size.</div>
<div><br>
</div>
<div><br>
</div>
<div>Raymond</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Python-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-Dev@python.org">Python-Dev@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com">https://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="" avgcert""="" color="#000000" align="left">No virus
found in this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 2012.0.2242 / Virus Database: 3222/6225 - Release Date:
10/05/13</p>
</blockquote>
<br>
</body>
</html>