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-37295: Optimize math.comb() and math.perm() #29090

Merged
merged 4 commits into from Dec 5, 2021

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 20, 2021

Use divide-and-conquer algorithm for getting benefit of Karatsuba
multiplication of large numbers.

Do calculations for comb() in C unsigned long long instead of Python
integers if possible.

https://bugs.python.org/issue37295

Use divide-and-conquer algorithm for getting benefit of Karatsuba
multiplication of large numbers.

Do calculations for comb() in C unsigned long long instead of Python
integers if possible.
@vstinner
Copy link
Member

Minor typo in the commit message, you already fixed it in GitHub :-) "devide-and => divide-and". Just be careful when you merge the PR, GitHub uses the commit message, not the PR description.

@vstinner
Copy link
Member

Benchmarks are quite impressive! https://bugs.python.org/issue37295#msg404208

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants