]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46020: Optimize long_pow for the common case (GH-30555)
authorTim Peters <tim.peters@gmail.com>
Wed, 12 Jan 2022 18:55:02 +0000 (12:55 -0600)
committerGitHub <noreply@github.com>
Wed, 12 Jan 2022 18:55:02 +0000 (12:55 -0600)
commitfc05e6bfce5d5dfc23859e6f7862c1e707a12e42
tree752b978b00117c5819083a8cb259744401afbb3a
parente2a9c8ef09cb7123d6b28852a323e6cc1f878b5b
bpo-46020: Optimize long_pow for the common case (GH-30555)

This cuts a bit of overhead by not initializing the table of small
odd powers unless it's needed for a large exponent.
Objects/longobject.c