]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-90716: add _pylong.py module (#96673)
authorNeil Schemenauer <nas-github@arctrix.com>
Wed, 26 Oct 2022 05:00:50 +0000 (22:00 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Oct 2022 05:00:50 +0000 (22:00 -0700)
commitde6981680bcf6496e5996a853b2eaa700ed59b2c
treea83c157e062851f9ea36eb8a11977ecd7e667d38
parent5d30544485dc56ab999ad7656ef6559306fd013f
gh-90716: add _pylong.py module (#96673)

Add Python implementations of certain longobject.c functions. These use
asymptotically faster algorithms that can be used for operations on
integers with many digits. In those cases, the performance overhead of
the Python implementation is not significant since the asymptotic
behavior is what dominates runtime. Functions provided by this module
should be considered private and not part of any public API.

Co-author: Tim Peters <tim.peters@gmail.com>
Co-author: Mark Dickinson <dickinsm@gmail.com>
Co-author: Bjorn Martinsson
Lib/_pylong.py [new file with mode: 0644]
Lib/test/test_int.py
Misc/NEWS.d/next/Core and Builtins/2022-09-09-16-32-58.gh-issue-90716.z4yuYq.rst [new file with mode: 0644]
Objects/longobject.c
Python/stdlib_module_names.h
Tools/scripts/divmod_threshold.py [new file with mode: 0644]