Message289030
The localization using keyword parameters is a very old trick to avoid global lookups. It does give a noticeable speedup, esp. when the localized variables are used in tight loops or the function itself is used in such loops.
The 5% speedup Steven measured matches my experience with this trick as well. In some cases, it can provide a more dramatic speedup, but this depends a lot on how the code is written. |
|
Date |
User |
Action |
Args |
2017-03-05 17:47:35 | lemburg | set | recipients:
+ lemburg, rhettinger, vstinner, steven.daprano, docs@python, serhiy.storchaka, Kwpolska |
2017-03-05 17:47:35 | lemburg | set | messageid: <1488736055.37.0.897084630494.issue29724@psf.upfronthosting.co.za> |
2017-03-05 17:47:35 | lemburg | link | issue29724 messages |
2017-03-05 17:47:35 | lemburg | create | |
|