Speed *triples* by changing 'apply(f, args)' to 'f(*args)'
Aahz
aahz at pythoncraft.com
Wed Mar 5 15:10:42 EST 2003
In article <mailman.1046829310.19920.python-list at python.org>,
Tim Peters <tim.one at comcast.net> wrote:
>
>There's more than meets the eye: because the apply() builtin is
>deprecated now, the implementation of __builtin__.apply() now calls
>warnings.warn() (a Python function) to see whether it should issue
>a deprecation warning. So the former also costs a new hidden call
>to a long Python function now, which in turn does many lookups and
>additional calls (both C and Python level) of its own. Luckily,
>Gerritt already figured out the best fix <wink>.
Ouch. Should we consider postponing the official deprecation of apply()
for one more release? I'm concerned about the possible speed of the
logging module.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Register for PyCon now! http://www.python.org/pycon/reg.html
More information about the Python-list
mailing list