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, and then pass the pointer (and the overall length if you 
need it) of that array on into a single function that copies the argument 
pointers into it and calls the Python function. As long as they are all really 
simple static functions that end with tail calls (i.e. with "return 
other_function()"), the C compiler should always be able to inline the entry 
points into their caller and not waste any additional C stack space for calling 
them.

----------

_______________________________________
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