Message277283
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 |
|
Date |
User |
Action |
Args |
2016-09-23 15:31:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, abarry, Demur Rumed |
2016-09-23 15:31:57 | serhiy.storchaka | set | messageid: <1474644717.06.0.671354831499.issue27358@psf.upfronthosting.co.za> |
2016-09-23 15:31:57 | serhiy.storchaka | link | issue27358 messages |
2016-09-23 15:31:56 | serhiy.storchaka | create | |
|