2018-07-10 14:59 GMT+02:00 INADA Naoki <songofacandy at gmail.com>: > PyObject_CallFunction(func, "n", 42); > > Currently, we create temporary long object for passing argument. > If there is protocol for exposeing format used by PyArg_Parse*, we can > bypass temporal Python object and call myfunc_impl directly. I'm not sure that it's worth it. It seems complex to implement. I proposed something simpler, but nobody tried to implement it. Instead of calling the long and complex PyArg_Parse...() functions, why not generating C code to parse arguments instead? The idea looks like "inlining" PyArg_Parse...() in its caller, but technically it means that Argument Clinic generates C code to parse arguments. PyArg_Parse...() is cheap and has been optimized, but on very fast functions (less than 100 ns), it might be significant. Well, to be sure, someone should run a benchmark :-) Victor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4