STINNER Victor added the comment:

Result of attached bench_recursion-2.py comparing before/after the 3 changes 
reducing the stack consumption:

test_python_call: Median +- std dev: [a30cdf366c02] 512 us +- 12 us -> 
[6478e6d0476f] 467 us +- 21 us: 1.10x faster (-9%)
test_python_getitem: Median +- std dev: [a30cdf366c02] 485 us +- 26 us -> 
[6478e6d0476f] 437 us +- 18 us: 1.11x faster (-10%)
test_python_iterator: Median +- std dev: [a30cdf366c02] 1.15 ms +- 0.04 ms -> 
[6478e6d0476f] 1.03 ms +- 0.06 ms: 1.12x faster (-10%)

At least, it doesn't seem to be slower. Maybe the speedup comes from 
call_function() inlining. This function was probably already inlined when using 
PGO build.

The script was written by Serhiy in the issue #29227, I modified it to use the 
Runner.timeit() API for convenience.

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

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to