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

bpo-46407: Optimizing some modulo operations #30653

Merged
merged 17 commits into from Jan 28, 2022

Conversation

thatbirdguythatuknownot
Copy link
Contributor

@thatbirdguythatuknownot thatbirdguythatuknownot commented Jan 17, 2022

Objects/longobject.c Show resolved Hide resolved
@sweeneyde
Copy link
Member

sweeneyde commented Jan 17, 2022

long_mod could probably use this too.

@sweeneyde sweeneyde requested a review from mdickinson Jan 17, 2022
@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 18, 2022

long_mod could probably use this too.

Done.

@sweeneyde
Copy link
Member

sweeneyde commented Jan 18, 2022

I did some pyperf benchmarking on a variety of input sizes:

https://gist.github.com/sweeneyde/c13681e7c2c2f086b9082b3e4cfd8137

Up to 1.46x faster, no worse than 1.09x slower. Using --min-speed=3 (3%), 15 cases were slower, 111 cases were faster. Geometric mean across all benchmarks was 1.06x faster.

Executables were compiled with --enable-optimizations --with-lto on GCC on WSL.

Objects/longobject.c Outdated Show resolved Hide resolved
@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 23, 2022

It seems that PR has lost all activity save for recent fix of conflict.

@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 25, 2022

PR bump.

@sweeneyde sweeneyde requested a review from tim-one Jan 25, 2022
Copy link
Member

@tim-one tim-one left a comment

Left some notes about comments that appear to need repairing. Other than those, looks good!

Objects/longobject.c Outdated Show resolved Hide resolved
Objects/longobject.c Show resolved Hide resolved
Objects/longobject.c Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

bedevere-bot commented Jan 25, 2022

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@bedevere-bot
Copy link

bedevere-bot commented Jan 25, 2022

Thanks for making the requested changes!

@tim-one: please review the changes made to this pull request.

@bedevere-bot
Copy link

bedevere-bot commented Jan 25, 2022

Thanks for making the requested changes!

@tim-one: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from tim-one Jan 25, 2022
Copy link
Member

@tim-one tim-one left a comment

Thanks! I'm out of complaints 😄.

Objects/longobject.c Outdated Show resolved Hide resolved
@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 26, 2022

PR bump.

@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 27, 2022

PR bump 2.

Copy link
Member

@tim-one tim-one left a comment

I don't see your name (assuming it's Jeremiah Vivian) in Misc/ACKS. It's not mandatory that you add it there, but it is traditional. If you'd like to add it there, this would be the time to do it.

@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Jan 27, 2022

Alright.

Misc/ACKS Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

bedevere-bot commented Jan 27, 2022

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@bedevere-bot
Copy link

bedevere-bot commented Jan 27, 2022

Thanks for making the requested changes!

@tim-one: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from tim-one Jan 27, 2022
@tim-one tim-one merged commit f10dafc into python:main Jan 28, 2022
12 checks passed
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.

None yet

6 participants