Next: Block Compilation, Previous: Tail Recursion, Up: Advanced Compiler Use and Efficiency Hints [Contents][Index]
Python supports two kinds of function call: full call and local call. Full call is the standard calling convention; its late binding and generality make Common Lisp what it is, but create unavoidable overheads. When the compiler can compile the calling function and the called function simultaneously, it can use local call to avoid some of the overhead of full call. Local call is really a collection of compilation strategies. If some aspect of call overhead is not needed in a particular local call, then it can be omitted. In some cases, local call can be totally free. Local call provides two main advantages to the user:
flet
and labels
much more efficient. A local
call is always faster than a full call, and in many cases is much
faster.
Next: Block Compilation, Previous: Tail Recursion, Up: Advanced Compiler Use and Efficiency Hints [Contents][Index]