3 ms·
In CPython, local function calls are still much faster than global function calls.
by nerdponx 9y ago
In CPython, local function calls are still much faster than global function calls.
- blattimwind 9y agoSimilarly, in CPython function-local variables are faster to access than class or module attributes (with the usual bunch of exceptions you always have in Python). This probably applies to similar languages (like Ruby) as well.