STINNER Victor added the comment:

Stefan Behnel added the comment:
> If you care so much about C stack space, you could also try to create two or 
> three entry point functions that keep (say) a 4, 8 and 16 items array on the 
> stack respectively, (...)

I should compute statistics, but I'm quite sure that most function
calls take 5 or less parameters. I don't think that allocating 5
PyObject* uses too much C stack, what do you think?

I don't think that using the heap memory for more parameters will
"kill" performances. Python 3.5 already does the same, a tuple is
allocated in the heap memory ;-) It just that I want to optimize the
common case.

----------

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

Reply via email to