[issue29286] Use METH_FASTCALL in str methods

2017-06-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset f0ff849adc6b4a01f9d1f08d9ad0f1511ff84541 by Victor Stinner in branch '3.6': bpo-30524: Fix _PyStack_UnpackDict() (#1886) https://github.com/python/cpython/commit/f0ff849adc6b4a01f9d1f08d9ad0f1511ff84541 -- __

[issue29286] Use METH_FASTCALL in str methods

2017-05-31 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1964 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/pytho

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5910fd7231d34363798d2815be2f66909e638d1c by Victor Stinner in branch 'master': Issue #29286: Rename private PyArg_UnpackStack_impl() to unpack_stack() https://github.com/python/cpython/commit/5910fd7231d34363798d2815be2f66909e638d1c -- _

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/pytho

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: str type still has a few methods using METH_VARARGS (slower than METH_FASTCALL): * count() * find() * index() * rfind() * rindex() * startswith() * endswith() * format() Maybe I will propose a change later to convert these methods to Argument Clinic, but I con

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "Oh, I have wrote almost the same patch before going to sleep yesteday! ;) But the building crashed (likely due to a bug in _PyStack_UnpackDict()) and it was too late to resolve this." Oh, sorry that you wrote almost the same code. Well, at

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 758674087b12 by Victor Stinner in branch 'default': Issue #29286: Rename private PyArg_UnpackStack_impl() to unpack_stack() https://hg.python.org/cpython/rev/758674087b12 -- ___ Python tracker

[issue29286] Use METH_FASTCALL in str methods

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: Recently, I saw complains that I push changes too fast without reviews. This issue is a good example. So let me elaborate myself a little bit on these changes. I'm not really proud of the "Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords" change. It s

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I have wrote almost the same patch before going to sleep yesteday! ;) But the building crashed (likely due to a bug in _PyStack_UnpackDict()) and it was too late to resolve this. I would prefer to rename "l" to "nargs" in PyArg_UnpackStack_impl and don'

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3bf78c286daf by Victor Stinner in branch 'default': Add _PyArg_UnpackStack() function helper https://hg.python.org/cpython/rev/3bf78c286daf New changeset 905e902bd47e by Victor Stinner in branch 'default': Argument Clinic: Use METH_FASTCALL for bori

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
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[] = {"", "", "", "", "", NUL

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset d07fd6e6d449 by Victor Stinner in branch 'default': Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords https://hg.python.org/cpython/rev/d07fd6e6d449 New changeset 01c57ef1b651 by Victor Stinner in branch 'default': Add _PyArg_ParseStack() hel

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
STINNER Victor added the comment: ac_more_fastcalls.patch: Hum, I guess that your change on _PyStack_UnpackDict() is related to a bug in the function prototype. The function is unable to report failure if args is NULL. It changed the API in the change 38ab8572fde2. --

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread INADA Naoki
INADA Naoki added the comment: This patch makes AC produces more FASTCALL instead of VARARGS. When looking AC output, one downside is it produces many consts like: +static const char * const _keywords[] = {"", "", "", "", "", NULL}; -- Added file: http://bugs.python.org/file46308/ac

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread INADA Naoki
INADA Naoki added the comment: Parsing positional arguments for METH_KEYWORDS and METH_FASTCALL can be faster by http://bugs.python.org/issue29029 -- ___ Python tracker ___ ___

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
STINNER Victor added the comment: > What is python-patch? It's Python patched with attached unicode_allow_kw.patch: allow to pass parameters as keywords for Unicode methods. -- keywords: +patch Added file: http://bugs.python.org/file46305/unicode_allow_kw.patch ___

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is python-patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread Yury Selivanov
Yury Selivanov added the comment: > * Allow passing arguments as keywoards: str.replace(old='a', new='b') I think Guido explicitly stated that he doesn't like the idea to always allow keyword arguments for all methods. I.e. `str.find('aaa')` just reads better than `str.find(needle='aaa')`. Ess

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
STINNER Victor added the comment: Background: see also the old issue #17170 closed as rejected: "string method lookup is too slow". -- ___ Python tracker ___ ___

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
New submission from STINNER Victor: Changes 27dc9a1c061e and 01b06ca45f64 converted the str (Unicode) methods to Argument Clinic, cool! But str methods taking more than one argument use positional-only arguments. Currently, Argument Clinic doesn't use METH_FASTCALL for these methods, but METH

[issue29286] Use METH_FASTCALL in str methods

2017-01-16 Thread STINNER Victor
STINNER Victor added the comment: The issue #29263 "Implement LOAD_METHOD/CALL_METHOD for C functions" should also optimize C methods even more. -- ___ Python tracker ___ __