A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-February/138149.html below:

[Python-Dev] (no subject)

[Python-Dev] (no subject) [Python-Dev] (no subject)Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 11 06:34:15 CET 2015
Victor Stinner wrote:
> Le 10 févr. 2015 06:48, "Greg Ewing" <greg.ewing at canterbury.ac.nz 
> <mailto:greg.ewing at canterbury.ac.nz>> a écrit :
>  > It could potentially be a little more efficient by
>  > eliminating the construction of an intermediate list.
> 
> Is it the case in the implementation? If it has to create a temporary 
> list/tuple, I will prefer to not use it.

The function call machinery will create a new tuple for
the positional args in any case. But if you manually
combine your * args into a tuple before calling, there
are *two* tuple allocations being done. Passing all the
* args directly into the call would allow one of them
to be avoided.

Similarly for dicts and ** args.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4