STINNER Victor added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29286>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com