Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use METH_FASTCALL | METH_KEYWORDS #446

Closed
rogerbinns opened this issue May 26, 2023 · 1 comment
Closed

use METH_FASTCALL | METH_KEYWORDS #446

rogerbinns opened this issue May 26, 2023 · 1 comment

Comments

@rogerbinns
Copy link
Owner

rogerbinns commented May 26, 2023

CPython really prefers this way of doing C methods, with several PEPs and issues converting C methods to use it.

The changes will be:

  • (Probably) dropping support for Python 3.6 (EOL Dec 2021)
  • The C prototype for the functions have to change
  • tools/gendocstrings.py will need to generate completely different arg parsing code. May as well do it for all functions, although it is only needed for performance sensitive ones
  • The arg parsing code will be able to generate far better error messages than PyArg_ParseTupleAndKeywords
@rogerbinns
Copy link
Owner Author

I made https://github.com/rogerbinns/python-fastcall which shows the old calling convention is getting slower and fastcall is getting faster, and confirms the points above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant