[Python-ideas] Make partial a built-in

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Sep 20 12:00:57 EDT 2016


On Tue, Sep 20, 2016 at 11:51 AM, Guido van Rossum <gvanrossum at gmail.com>
wrote:

> Also, I once timed it and could not show that partial was faster. This
> surprised me but it was what I measured (in one particular case).


I did similar timings on several occasions in the past and was also
surprised by the results.  Lambdas are often faster than equivalent
partials.  It looks like at least recent versions of Python have ways to
optimize calls to pure Python functions that are not available to functions
implemented in C or called from C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160920/63d6128d/attachment.html>


More information about the Python-ideas mailing list