Victor Stinner wrote:
Le 10 févr. 2015 06:48, "Greg Ewing" <greg.ew...@canterbury.ac.nz
<mailto:greg.ew...@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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com