Message285597
Naoki> This patch makes AC produces more FASTCALL instead of VARARGS.
Oh, funny, I wrote the same patch :-) (almost)
> When looking AC output, one downside is it produces many consts like:
> + static const char * const _keywords[] = {"", "", "", "", "", NULL};
Yeah, I got the same result. I tried to hack a _PyArg_ParseStack() function which doesn't take keyword argments (no kwnames), but I lost my mind in parser_init().
So I decided to simply rebase my old patches from my random CPython fastcall forks to add a simple _PyArg_ParseStack(). My implementation doesn't use the super-fast _PyArg_Parser object, but at least it allows to use METH_FASTCALL. Compared to what we had previously (METH_VARARGS), it is an enhancement :-)
I prefer to move step by step, since each commit is already big enough. It's also easier for me to maintain my forks if I push more changes upstream.
So there is still room for improvement in _PyArg_ParseStack(), but I suggest to defer further optimizations to a new issue. |
|
Date |
User |
Action |
Args |
2017-01-17 01:37:54 | vstinner | set | recipients:
+ vstinner, larry, methane, python-dev, serhiy.storchaka, yselivanov |
2017-01-17 01:37:53 | vstinner | set | messageid: <1484617073.77.0.226350412989.issue29286@psf.upfronthosting.co.za> |
2017-01-17 01:37:53 | vstinner | link | issue29286 messages |
2017-01-17 01:37:51 | vstinner | create | |
|