Message322841
`PyTuple_SetItem()` can be replaced with macro version and `PyObject_Call()` can be used instead of `PyEval_CallObject()`.
Here's benchmark results:
$ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s "from functools import reduce; from operator import is_; r = range(50000)" "reduce(is_, r)"
/home/sergey/tmp/cpython-master-venv/bin/python: ..................... 1.64 ms +- 0.01 ms
/home/sergey/tmp/cpython-venv/bin/python: ..................... 1.40 ms +- 0.00 ms
Mean +- std dev: [/home/sergey/tmp/cpython-master-venv/bin/python] 1.64 ms +- 0.01 ms -> [/home/sergey/tmp/cpython-venv/bin/python] 1.40 ms +- 0.00 ms: 1.17x faster (-15%) |
|
Date |
User |
Action |
Args |
2018-08-01 05:09:03 | sir-sigurd | set | recipients:
+ sir-sigurd |
2018-08-01 05:09:03 | sir-sigurd | set | messageid: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> |
2018-08-01 05:09:03 | sir-sigurd | link | issue34303 messages |
2018-08-01 05:09:03 | sir-sigurd | create | |
|