optimization question

Andrew Koenig ark at research.att.com
Sun Aug 11 18:15:42 EDT 2002


Peter> All of which are exactly the reasons to make it *work*, then
Peter> make it fast.  Starting with s[i:j] == t without any
Peter> optimization is a fine way to begin...  then refactor when
Peter> the tests show it's all working perfectly.

That technique is problematic unless you anticipated that you
might want to change the code in that way.  Otherwise, by the
time you have enough of a system to measure, you've written
s[i:j} == t  in a zillion places throughout the code, and
replacing them all by function calls is a problem.


-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark



More information about the Python-list mailing list