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

Implement PyPy alternative to borrowed references in argument parsing #2723

Open
scoder opened this Issue Nov 18, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@scoder
Contributor

scoder commented Nov 18, 2018

PyPy's C-API emulation generally has issues with borrowed references because their lifetime is difficult to control for the GC. Cython already avoids borrowed references in most places when compiling in PyPy, except for the initial argument parsing code in Python functions. The code is very much tuned for CPython but not for PyPy. It would be nice to also generate alternative code for PyPy that performs better for them.

The current implementation is generated in DefNodeWrapper.generate_argument_parsing_code() and its subfunctions, specifically generate_tuple_and_keyword_parsing_code() but also other places that use macro access like PyTuple_GET_ITEM() and friends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment