<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Jul 1, 2007, at 7:13 PM, elis aeris wrote:</div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br class="webkit-block-placeholder"></font></blockquote><blockquote type="cite"> might just end my quest for <br>optimized python source code. <br>ugh,  <br><br>what does it mean ?<br></blockquote></div><br><div><br class="webkit-block-placeholder"></div><div>elias,</div><div><br class="webkit-block-placeholder"></div><div>We have two MAJOR rules regarding optimization.  These rules really go beyond python, but this is a good place to learn them.</div><div><br class="webkit-block-placeholder"></div><div>The two rules of optimization:</div><div><br class="webkit-block-placeholder"></div><div>The first is:</div><div>1) DON'T DO IT!</div><div><br class="webkit-block-placeholder"></div><div>The second is only for advanced programmers.</div><div>2) Don't do it, yet!</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Until you have working code, there is nothing to optimize. You can spend months optimizing and refactoring a for loop only to find out that you are hung up on a network operation.  Write the program first. Then see if it needs tweaking. other wise you are simply rewriting this:</div><div><br class="webkit-block-placeholder"></div><div>for None in None:</div><div>    pass</div><div><br class="webkit-block-placeholder"></div><div>~ro</div><div><br></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div></body></html>