This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Demur Rumed, abarry, rhettinger, serhiy.storchaka, vstinner
Date 2016-09-23.15:31:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474644717.06.0.671354831499.issue27358@psf.upfronthosting.co.za>
In-reply-to
Content
Microbenchmarks:

$ ./python -m timeit -s "def f(**kw): pass" -s "b = {'b': 2}" -- "f(a=1, **b)"
Unpatched:  100000 loops, best of 3: 7.64 usec per loop
Patched:    100000 loops, best of 3: 3.14 usec per loop

$ ./python -m timeit -s "def f(**kw): pass" -s "a = {'a': 1}; b = {'b': 2}" -- "f(**a, **b)"
Unpatched:  100000 loops, best of 3: 6.93 usec per loop
Patched:    100000 loops, best of 3: 2.66 usec per loop

$ ./python -m timeit -s "def f(a=None, b=None): pass" -s "b = {'b': 2}" -- "f(a=1, **b)"
Unpatched:  100000 loops, best of 3: 7.27 usec per loop
Patched:    100000 loops, best of 3: 2.83 usec per loop

$ ./python -m timeit -s "def f(a=None, b=None): pass" -s "a = {'a': 1}; b = {'b': 2}" -- "f(**a, **b)"
Unpatched:  100000 loops, best of 3: 6.47 usec per loop
Patched:    100000 loops, best of 3: 2.31 usec per loop
History
Date User Action Args
2016-09-23 15:31:57serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, abarry, Demur Rumed
2016-09-23 15:31:57serhiy.storchakasetmessageid: <1474644717.06.0.671354831499.issue27358@psf.upfronthosting.co.za>
2016-09-23 15:31:57serhiy.storchakalinkissue27358 messages
2016-09-23 15:31:56serhiy.storchakacreate