]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37295: Optimize math.comb() and math.perm() (GH-29090)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 5 Dec 2021 20:26:10 +0000 (22:26 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Dec 2021 20:26:10 +0000 (22:26 +0200)
commit60c320c38e4e95877cde0b1d8562ebd6bc02ac61
treec22e03b50c431a0c46d84d03f20a8ff9f471aaf0
parent628abe4463ed40cd54ca952a2b4cc2d6e74073f7
bpo-37295: Optimize math.comb() and math.perm() (GH-29090)

For very large numbers use divide-and-conquer algorithm for getting
benefit of Karatsuba multiplication of large numbers.

Do calculations completely in C unsigned long long instead of Python
integers if possible.
Doc/whatsnew/3.11.rst
Misc/NEWS.d/next/Library/2021-10-18-16-08-55.bpo-37295.wBEWH2.rst [new file with mode: 0644]
Modules/mathmodule.c