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

PEP 757: C API to import-export Python integers #3961

Merged
merged 11 commits into from
Sep 14, 2024
Merged

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 13, 2024

@vstinner
Copy link
Member Author

cc @skirpichev

peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <[email protected]>
@vstinner
Copy link
Member Author

@hugovk: Thanks, I applied your suggestions.

@vstinner
Copy link
Member Author

@skirpichev: I ran benchmarks myself and I get different results than yours.

Did you compile Python in release mode? What is your CPU and operating system?

I'm surprised by absolute numbers but also by comparing numbers (before/after). In my results, 1<<300 is 1.06x faster with this PEP. In your results, it's 1.12x slower (the opposite).

peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
peps/pep-0757.rst Show resolved Hide resolved
peps/pep-0757.rst Outdated Show resolved Hide resolved
vstinner and others added 2 commits September 13, 2024 18:30
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
@vstinner vstinner marked this pull request as ready for review September 14, 2024 09:14
@vstinner vstinner requested a review from a team as a code owner September 14, 2024 09:14
@vstinner vstinner merged commit 5ac83c8 into python:main Sep 14, 2024
6 checks passed
@vstinner vstinner deleted the pep757 branch September 14, 2024 09:33
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.

4 participants