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

GH-101291: Refactor the PyLongObject struct #101292

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jan 24, 2023

There is no change to the implementation, apart from the refactoring of the struct. Even the binary layout remains the same.

This is the first step in improving int performance. The real changes will come later, but this PR will help keep later PR small and manageable.

Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem fine to me, though it's a little bit disturbing to see how much the longobject internals have leaked into the rest of the codebase.

Have we looked into the possible impact of these changes on 3rd party libraries? Most shouldn't care, but I'd imagine it'll affect Cython at least, and possibly also things like NumPy and gmpy2.

@markshannon
Copy link
Member Author

Changes seem fine to me, though it's a little bit disturbing to see how much the longobject internals have leaked into the rest of the codebase.

It is, but at least it gives us a guide for what API functions we need to add.

Have we looked into the possible impact of these changes on 3rd party libraries? Most shouldn't care, but I'd imagine it'll affect Cython at least, and possibly also things like NumPy and gmpy2.

I guess we need to clearly document the changes and recommended API functions.
I will do that in the next PR.

@markshannon markshannon merged commit c1b1f51 into python:main Jan 30, 2023
mdboom pushed a commit to mdboom/cpython that referenced this pull request Jan 31, 2023
@tacaswell
Copy link
Contributor

but I'd imagine it'll affect Cython at least,

Does indeed hit cython! Can not tell if it hits numpy independent of cython because the cythonized files fail to build.

@encukou
Copy link
Member

encukou commented Jul 3, 2023

I guess we need to clearly document the changes and recommended API functions.
I will do that in the next PR.

Did you get around to this? I can't see it in What's New.

@markshannon markshannon deleted the split-long branch September 26, 2023 12:55
MartinNowak added a commit to 7Learnings/ssh-python that referenced this pull request Jun 25, 2024
- generated c files are outdated due to [GH-101291](python/cpython#101292)
EliusSolis added a commit to EliusSolis/charm that referenced this pull request Jul 28, 2024
MartinNowak added a commit to 7Learnings/ssh-python that referenced this pull request Dec 26, 2024
- generated c files are outdated due to [GH-101291](python/cpython#101292)
MartinNowak added a commit to 7Learnings/ssh-python that referenced this pull request Dec 27, 2024
- generated c files are outdated due to [GH-101291](python/cpython#101292)
MartinNowak added a commit to 7Learnings/ssh2-python that referenced this pull request Dec 27, 2024
- generated c files are outdated due to [GH-101291](python/cpython#101292)
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

Successfully merging this pull request may close these issues.

5 participants