[issue29227] Reduce C stack consumption in function calls

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: Victor: "I plan to run a benchmark when all my patches to reduce the stack consumption will be ready." msg285200 of issue #28870: "I also ran the reliable performance benchmark suite with LTO+PGO. There is no significant performance change on these benchmarks

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8481c379e2da by Victor Stinner in branch 'default': Inline call_function() https://hg.python.org/cpython/rev/8481c379e2da -- nosy: +python-dev ___ Python tracker _

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: I plan to run a benchmark when all my patches to reduce the stack consumption will be ready. I'm still trying all the various options to reduce the stack consumption. I'm trying to avoid hacks and reduce the number of changes. I'm already better than Python 2.

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I didn't provide results with less_stack.patch because they were almost the same, just 1-3% faster. That might be just a random noise or compiler artifact. But may be an effect of inlining call_function(). Could you run full Python benchmarks? Decreasing the

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Oh wow! I'm impressed that Python 3 is better at each release! On 2 tests, Python 3.7 is faster than Python 2.7, but on test_python_iterator Python 3.7 is still slower. It seems like this specific test became much slower (+19%) on Python 3.4 compared to 2.7.

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Serhiy Storchaka
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

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
New submission from STINNER Victor: Attached patch reduce C stack consumption in function calls. It's the follow-up of the issue #28870. Reference (rev a30cdf366c02): test_python_call: 7175 calls before crash, stack: 1168 bytes/call test_python_getitem: 6235 calls before crash, stack: 1344 by