summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2024-05-08 00:09:09 (GMT)
committerGitHub <noreply@github.com>2024-05-08 00:09:09 (GMT)
commit2f0a338be66e276a700f86af51d5ef54a138cbfb (patch)
tree3cf16245a701df9250c93b7684dbee8bc44b8376 /Objects
parent2a85bed89dc14327afe344a57233a37795fde2b9 (diff)
downloadcpython-2f0a338be66e276a700f86af51d5ef54a138cbfb.zip
cpython-2f0a338be66e276a700f86af51d5ef54a138cbfb.tar.gz
cpython-2f0a338be66e276a700f86af51d5ef54a138cbfb.tar.bz2
gh-118610: Centralize power caching in `_pylong.py` (#118611)
A new `compute_powers()` function computes all and only the powers of the base the various base-conversion functions need, as efficiently as reasonably possible (turns out that invoking `**`is needed at most once). This typically gives a few % speedup, but the primary point is to simplify the base-conversion functions, which no longer need their own, ad hoc, and less efficient power-caching schemes. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Objects')
0 files changed, 0 insertions, 0 deletions