[issue29227] Reduce C stack consumption in function calls

Serhiy Storchaka report at bugs.python.org
Tue Jan 10 14:25:41 EST 2017


Serhiy Storchaka added the comment:

$ ./python -m perf timeit -s "from bench_recursion import test_python_call as test" -- "test(1000)"
Python 2.7:  5.10 ms +- 0.37 ms
Python 3.4:  4.38 ms +- 0.28 ms
Python 3.5:  4.19 ms +- 0.26 ms
Python 3.6:  3.93 ms +- 0.32 ms
Python 3.7:  3.26 ms +- 0.27 ms

$ ./python -m perf timeit -s "from bench_recursion import test_python_getitem as test" -- "test(1000)"
Python 2.7:  4.09 ms +- 0.26 ms
Python 3.4:  4.60 ms +- 0.23 ms
Python 3.5:  4.35 ms +- 0.28 ms
Python 3.6:  4.05 ms +- 0.34 ms
Python 3.7:  3.23 ms +- 0.23 ms

$ ./python -m perf timeit -s "from bench_recursion import test_python_iterator as test" -- "test(1000)"
Python 2.7:  7.85 ms +- 0.66 ms
Python 3.4:  9.31 ms +- 0.55 ms
Python 3.5:  9.83 ms +- 0.71 ms
Python 3.6:  8.99 ms +- 0.66 ms
Python 3.7:  8.58 ms +- 0.73 ms

----------
Added file: http://bugs.python.org/file46243/bench_recursion.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29227>
_______________________________________


More information about the Python-bugs-list mailing list