This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients larry, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2016-04-24.07:15:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461482135.77.0.174227934474.issue26814@psf.upfronthosting.co.za>
In-reply-to
Content
> Thus I think we need to optimize only cases of calling with small number (0-3) of positional arguments.

My code is optimized to up to 10 positional arguments: with 0..10 arguments, the C stack is used to hold the array of PyObject*. For more arguments, an array is allocated in the heap memory.

+   /* 10 positional parameters or 5 (key, value) pairs for keyword parameters.
+      40 bytes on 32-bit or 80 bytes on 64-bit. */
+#  define _PyStack_SIZE 10

For keyword parameters, I don't know yet what is the best API (fatest API). Right now, I'm also using the same PyObject** array for positional and keyword arguments using "int nk", but maybe a dictionary is faster to combinary keyword arguments and to parse keyword arguments.
History
Date User Action Args
2016-04-24 07:15:35vstinnersetrecipients: + vstinner, rhettinger, larry, serhiy.storchaka, yselivanov
2016-04-24 07:15:35vstinnersetmessageid: <1461482135.77.0.174227934474.issue26814@psf.upfronthosting.co.za>
2016-04-24 07:15:35vstinnerlinkissue26814 messages
2016-04-24 07:15:35vstinnercreate