]> granicus.if.org Git - python/commit
SF patch 936813: fast modular exponentiation
authorTim Peters <tim.peters@gmail.com>
Sun, 29 Aug 2004 22:16:50 +0000 (22:16 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 29 Aug 2004 22:16:50 +0000 (22:16 +0000)
commit0973b99e1cfe13b3d197e1b6c449a2d75b55d17a
tree56d50378b5dd36f12a23149c54554f07bc5784f7
parentafb5f9421719e7c7ada1a236bb226c9f84eaf880
SF patch 936813: fast modular exponentiation

This checkin is adapted from part 1 (of 3) of Trevor Perrin's patch set.

x_mul()
  - sped a little by optimizing the C
  - sped a lot (~2X) if it's doing a square; note that long_pow() squares
    often
k_mul()
  - more cache-friendly now if it's doing a square
KARATSUBA_CUTOFF
  - boosted; gradeschool mult is quicker now, and it may have been too low
    for many platforms anyway
KARATSUBA_SQUARE_CUTOFF
  - new
  - since x_mul is a lot faster at squaring now, the point at which
    Karatsuba pays for squaring is much higher than for general mult
Include/longintrepr.h
Misc/ACKS
Misc/NEWS
Objects/longobject.c