Thank you developers for 2.3
David Lees
abcdebl2nonspammy at verizon.net
Wed Jul 30 23:40:06 EDT 2003
Added initialization to a long and printout of both time and result.
Looks like faith was justified, but good point Raymond.
David Lees
------------
import time
def speedTest(N):
t1 = time.time()
k = 0L
for i in xrange(N):
for j in xrange(N):
k += (i+j)
t2 = time.time()
return t2-t1,k
print speedTest(3000)
---------
Python 2.3
>>> (5.406999945640564, 26991000000L)
Python 2.2.3
>>> (10.465000033378601, 26991000000L)
More information about the Python-list
mailing list