Python 3 read() function

Istvan Albert istvan.albert at gmail.com
Thu Dec 4 13:20:00 EST 2008


I can confirm this,

I am getting very slow read performance when reading a smaller 20 MB
file.

 - Python 2.5 takes 0.4 seconds
 - Python 3.0 takes 62 seconds

fname = "dmel-2R-chromosome-r5.1.fasta"
data = open(fname, 'rt').read()
print ( len(data) )




More information about the Python-list mailing list