Message210881
> Yury: it's a micro-optimization, the slow builtin lookup becomes a fast local lookup.
That's what I thought, thank you.
I think we should discourage use of this pattern (at least in the stdlib). There is small to no performance benefit to do that.
And if it's absolutely required to optimize the hell out of function, it's much better to just create a protected module attribute:
_int = int
That way, there is almost no performance difference between _int in the signature, and _int as a module global. |
|
Date |
User |
Action |
Args |
2014-02-10 22:17:37 | yselivanov | set | recipients:
+ yselivanov, georg.brandl, ncoghlan, r.david.murray, serhiy.storchaka |
2014-02-10 22:17:37 | yselivanov | set | messageid: <1392070657.12.0.132265039133.issue20583@psf.upfronthosting.co.za> |
2014-02-10 22:17:37 | yselivanov | link | issue20583 messages |
2014-02-10 22:17:36 | yselivanov | create | |
|