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

@sweeneyde
Copy link
Member

long_mod could probably use this too.

@thatbirdguythatuknownot
Copy link
Contributor Author

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

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

@thatbirdguythatuknownot
Copy link
Contributor Author

PR bump.

Copy link
Member

@tim-one tim-one left a comment

Choose a reason for hiding this comment

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

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

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

Thanks for making the requested changes!

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

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

Copy link
Member

@tim-one tim-one left a comment

Choose a reason for hiding this comment

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

Thanks! I'm out of complaints 😄.

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

PR bump.

@thatbirdguythatuknownot
Copy link
Contributor Author

PR bump 2.

Copy link
Member

@tim-one tim-one left a comment

Choose a reason for hiding this comment

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

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

Alright.

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

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

Thanks for making the requested changes!

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

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.

6 participants