Commit 9259c21
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.
Merged from 3.3.1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3878 | 3878 | | |
3879 | 3879 | | |
3880 | 3880 | | |
3881 | | - | |
3882 | | - | |
3883 | | - | |
3884 | | - | |
| 3881 | + | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
3885 | 3891 | | |
3886 | 3892 | | |
3887 | 3893 | | |
| |||
0 commit comments