From: "Alec Mihailovs" <alec@mihailovs.com>
On this particular computer, with Windows Vista and ActiveState Python 2.5.1.1, AMD Athlon 64 X2 5200+,
from time import clock def ti(n): ... t=clock() ... som=0 ... for i in xrange(1,n): ... som=som+1.0/i ... if i%100000==0: ... print som, ... return clock()-t ...
produced the following results (skipping the printed values)
ti(100) 0.00011667999999787071
ti(10000000) 4.3266990400000012
ti(100000000) 42.826358080000006
So, 100000 loop operations were done in about 0.04 seconds each. That's 25 times faster than ENIAC (actually, more than that, because a loop operation is not just an addition) and I can't tell how much it is faster than Maple because I don't have Maple installed. Anyway, it is not that bad.
Just out of curiosity, after I installed Ubuntu 7.04 on that computer, with 500 GB hard drive - enough to split between 2 OS, and with 2 GB of RAM (if that makes a difference), I got the following results with Python 2.5 that comes with Ubuntu (again skipping the printed values),
ti(100) 0
ti(10000000) 4.2800000000000002
ti(100000000) 39.079999999999998
That's generally the same. Amazing thing is that Linux seems to slightly outperform Windows. I guess that's because I used ActiveState Python version in Windows. Later, when I install the standard Python on Windows, I'll check the results there as well. Alec