Python vs. Java gzip performance

Caleb Hattingh caleb.hattingh at
Tue Mar 21 22:45:13 CET 2006

Hi Peter

Clearly I misunderstood what Martin was saying :)    I was comparing
operations on lines via the file generator against first loading the
file's lines into memory, and then performing the concatenation.

What does ".readlines()" do differently that makes it so much slower
than ".read().splitlines(True)"?  To me, the "one obvious way to do it"
is ".readlines()".


More information about the Python-list mailing list