Message273496
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. |
|
Date |
User |
Action |
Args |
2016-08-23 17:53:06 | scoder | set | recipients:
+ scoder, vstinner, serhiy.storchaka |
2016-08-23 17:53:06 | scoder | set | messageid: <1471974786.13.0.382183237353.issue27841@psf.upfronthosting.co.za> |
2016-08-23 17:53:06 | scoder | link | issue27841 messages |
2016-08-23 17:53:06 | scoder | create | |
|