Author vstinner
Recipients inada.naoki, larry, python-dev, serhiy.storchaka, vstinner, yselivanov
Date 2017-01-17.01:37:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484617073.77.0.226350412989.issue29286@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-01-17 01:37:54vstinnersetrecipients: + vstinner, larry, inada.naoki, python-dev, serhiy.storchaka, yselivanov
2017-01-17 01:37:53vstinnersetmessageid: <1484617073.77.0.226350412989.issue29286@psf.upfronthosting.co.za>
2017-01-17 01:37:53vstinnerlinkissue29286 messages
2017-01-17 01:37:51vstinnercreate