Is seems that the mmap interface only supports readline(). If I try to iterate over the object I get character instead of complete lines.
What would be the \"python
Python 2.7 32bit on Windows is more than twice as fast on an mmapped file:
On a 27MB, 509k line text file (my 'parse' function is not interesting it mostly just readline()'s very rapidly):
with open(someFile,"r") as f:
if usemmap:
m=mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
else:
m=f
e.parse(m)
With MMAP:
read in 0.308000087738
Without MMAP:
read in 0.680999994278