[Python-ideas] Faster PyArg_ParseTupleAndKeywords kwargs

dw+python-ideas at hmmz.org dw+python-ideas at hmmz.org
Fri May 23 22:07:17 CEST 2014


On Fri, May 23, 2014 at 07:22:20PM +0000, dw+python-ideas at hmmz.org wrote:

>         if(! PyArg_FastParse(&arg_info, args, kwds, "ns#|O!", keywords,
>                              &foo, &some_buf, &some_buf_size,
>                              &PyList_Type, &list)) {
>             return NULL;
>         }

Perhaps the most off-the-wall approach would be to completely preserve
the existing interface, by using a dollop of assembly to fetch the
return address, and use that to maintain some internal hash table.

That's incredibly nasty, but as a systemic speedup it might be worth it?


David


More information about the Python-ideas mailing list