summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorTim Peters <tim@python.org>2013-10-05 21:53:52 (GMT)
committerTim Peters <tim@python.org>2013-10-05 21:53:52 (GMT)
commit81a93159d7a4bfc6a6d06f44528d9d17a8c634c2 (patch)
tree02edb29d74df1369a2b1da0ea1552e875e8dfc85 /Python/modsupport.c
parent7760b4eb4bedba81eb69d14f98ac978d37bc691a (diff)
downloadcpython-81a93159d7a4bfc6a6d06f44528d9d17a8c634c2.zip
cpython-81a93159d7a4bfc6a6d06f44528d9d17a8c634c2.tar.gz
cpython-81a93159d7a4bfc6a6d06f44528d9d17a8c634c2.tar.bz2
Issue #19171: speed some cases of 3-argument long pow().
Reduce the base by the modulus when the base is larger than the modulus. This can unboundedly speed the "startup costs" of doing modular exponentiation, particularly in cases where the base is much larger than the modulus. Original patch by Armin Rigo, inspired by https://github.com/pyca/ed25519.
Diffstat (limited to 'Python/modsupport.c')
0 files changed, 0 insertions, 0 deletions