Message273412
Here is a first patch:
* Add _PyObject_FastCallKeywords(): main entry point
* Add _PyCFunction_FastCallKeywords(): implementation for C function, but currently it's just an empty skeleton
* Rename fast_function() to PyFunction_FastCallKeywords() and ajust its API
In this first implementation, _PyObject_FastCallKeywords() has a full implementation for Python function, otherwise it only uses _PyObject_FastCallDict() fast path if the function has no keyword argument. In the last resort, it creates a temporary tuple and maybe also a temporary dict, to call PyObject_Call().
To test the patch, I modified do_call() to call _PyObject_FastCallKeywords(). I'm not sure that it makes sense in term of performance at this stage.
Serhiy: You can use this first implementation to experimental for fast argument parser for keyword arguments passed as (key, value) pairs ;-) |
|
Date |
User |
Action |
Args |
2016-08-22 23:30:22 | vstinner | set | recipients:
+ vstinner, scoder, serhiy.storchaka |
2016-08-22 23:30:22 | vstinner | set | messageid: <1471908622.19.0.737337965832.issue27830@psf.upfronthosting.co.za> |
2016-08-22 23:30:22 | vstinner | link | issue27830 messages |
2016-08-22 23:30:22 | vstinner | create | |
|