This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients christian.heimes, gregory.p.smith, mark.dickinson, tim.peters, trevp
Date 2009-12-31.19:39:34
SpamBayes Score 5.630425e-06
Marked as misclassified No
Message-id <1262288376.86.0.891609214377.issue936813@psf.upfronthosting.co.za>
In-reply-to
Content
Okay, I retested the original patch without any of my refactoring (besides 
fixing the twodigits cast), and got pretty much the same numbers.

On a 32-bit non-debug trunk build (still on OS X 10.6), I get:

Unpatched
---------

Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe 
../pow_benchmark.py 
1024 bits: 0.033691
2048 bits: 0.224796
3072 bits: 0.712510
4096 bits: 1.691484
Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe ../time_powmod.py
64-bit modulus: 0.000054
253-bit modulus: 0.000981
1023-bit modulus: 0.034314

Patched
-------

Mark-Dickinsons-MacBook-Pro:trunk-issue936813 dickinsm$ ./python.exe 
../pow_benchmark.py 
1024 bits: 0.027317  (+23.3%)
2048 bits: 0.181053  (+24.2%)
3072 bits: 0.571688  (+24.6%)
4096 bits: 1.251051  (+35.2%)
Mark-Dickinsons-MacBook-Pro:trunk-issue936813 dickinsm$ ./python.exe 
../time_powmod.py
64-bit modulus: 0.000045 (+20.0%)
253-bit modulus: 0.000773 (+26.9%)
1023-bit modulus: 0.026983 (+27.2%)

I must admit I was hoping for a bit more than this.  IMO, these speedups 
aren't big enough to justify the extra complexity for what's really a bit 
of a niche function, so I'm going to reject this 3rd part and close this 
issue (but marking it as 'accepted' because most of the original 2004 
patch went in).
History
Date User Action Args
2009-12-31 19:39:36mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, gregory.p.smith, trevp, christian.heimes
2009-12-31 19:39:36mark.dickinsonsetmessageid: <1262288376.86.0.891609214377.issue936813@psf.upfronthosting.co.za>
2009-12-31 19:39:35mark.dickinsonlinkissue936813 messages
2009-12-31 19:39:34mark.dickinsoncreate