<div class="gmail_quote">On Mon, Jul 15, 2013 at 5:25 PM, <span dir="ltr"><<a href="mailto:fronagzen@gmail.com" target="_blank">fronagzen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">Again, thanks for all the responses. I'm curious, though, what exactly is the rationale for making functions so small? (I've heard that the function calling of Python has relatively high overhead?)</div>
</div>
</blockquote></div><br><div>There is a small overhead, but it makes the code easier to read and understand. You can look at the function name and get and idea of _what_ the function is doing instead of having to figure out _how_ it is doing it. </div>
<div><br></div><div>Regarding optimization, after you have written your application if you see performance issues you can surgically optimize the spots that have the issues and leave most of the code untouched. </div><div>
<br></div><div>To quote Don Knuth, "premature optimization is the root of all evil". Also the article at <a href="http://en.wikipedia.org/wiki/Program_optimization">http://en.wikipedia.org/wiki/Program_optimization</a> makes some good points.</div>