On the one hand, I read or hear that "function calls are expensive" and that they impact efficiency (for example, on Nicholas Zakas' Google tech talk).
On the other hand, however, it seems accepted that functions/methods are best kept short and should only really perform one task, as generally accepted in here.
Am I missing something here, or don't these two pieces of advice run contrary to one another? Is there some rule-of-thumb that allows one to maintain a Zen-like balance?
See Question&Answers more detail:os