Turns out write performance is also slow!

The program below takes

 3 seconds on python 2.5
17 seconds on python 3.0

yes, 17 seconds! tested many times in various order. I believe the
slowdowns are not constant (3x) but some sort of nonlinear function
(quadratic?) play with the N to see it.

===================================

import time

start = time.time()

N = 10**6
fp = open('testfile.txt', 'wt')
for n in range(N):
    fp.write( '%s\n' % n )
fp.close()

end = time.time()

print (end-start)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to