Message197849
| Author |
orsenthil |
| Recipients |
eric.araujo, georg.brandl, michael.driscoll, orsenthil, python-dev, rhettinger, sandro.tosi, smichr, tim.peters |
| Date |
2013年09月16日.00:36:07 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAPOVWOSJO5=4VDAnk3XqdM9Hug0Eqo6eBrbvLtMRMZRH6r6_7w@mail.gmail.com> |
| In-reply-to |
<CAExdVN=dVquv3vrkL1th5Mt1owYtDuXoYy3eccFa3RN1T4+iTQ@mail.gmail.com> |
| Content |
Tim Peters added the comment:
> ..., _fast=slow, ...
>
> in an argument list means we endure the slow lookup (of `slow`) only
> once, when the function is first defined. When the function is
> _called_, that binding is available via the local (much faster lookup)
> variable `_fast`.
>
> Purely a speed trick, but can make a real difference in very heavily
> used functions.
Thanks for the answer, Tim. Interesting optimization. |
|