Message264101
> 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. |
|
Date |
User |
Action |
Args |
2016-04-24 07:15:35 | vstinner | set | recipients:
+ vstinner, rhettinger, larry, serhiy.storchaka, yselivanov |
2016-04-24 07:15:35 | vstinner | set | messageid: <1461482135.77.0.174227934474.issue26814@psf.upfronthosting.co.za> |
2016-04-24 07:15:35 | vstinner | link | issue26814 messages |
2016-04-24 07:15:35 | vstinner | create | |
|