Commit 81a9315
Tim Peters
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.1 parent 7760b4e commit 81a9315
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3868 | 3868 | | |
3869 | 3869 | | |
3870 | 3870 | | |
3871 | | - | |
3872 | | - | |
3873 | | - | |
3874 | | - | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
3875 | 3881 | | |
3876 | 3882 | | |
3877 | 3883 | | |
| |||
0 commit comments