math.pow(x,y)

Raymond L. Buvel levub137 at wi.rr.com
Sun Jun 11 17:34:55 EDT 2006


K.S.Sreeram wrote:
> Raymond L. Buvel wrote:
>> I just tried this and it is taking an extremely long time even on a fast
>> machine with 4 Gb of RAM.  Killed it after a couple of minutes.
> 
> Thats odd.
> 34564323**456356 completed on my laptop in 28 seconds.
> [Python 2.4.3, Celeron-M 1.3GHz, WinXP], and max memory consumption
> during the whole process was about 11megs.
> 
> What python version are you using?
> 
> Regards
> Sreeram
> 

Sorry, I tripped over the display problem that Tim Peters has repeatedly
explained on this news group (decimal algorithm is quadratic in the
number of digits)  :-(

On a 64-bit 2.2 GHz Opteron running Debian stable, Python 2.3 took 26
seconds and Python 2.4 took 11 seconds.



More information about the Python-list mailing list