Serhiy Storchaka added the comment:
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
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27358>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com