regex over files
Robin Becker
robin at reportlab.com
Thu Apr 28 10:42:43 EDT 2005
Robin Becker wrote:
> Skip Montanaro wrote:
> ......
>
>>
>> I'm not sure why the mmap() solution is so much slower for you.
>> Perhaps on
>> some systems files opened for reading are mmap'd under the covers.
>> I'm sure
>> it's highly platform-dependent. (My results on MacOSX - see below - are
>> somewhat better.)
>>
..... as a data point with sscan0/1.py (slight mods of your code) I get this
with a 200mb file on freeBSD 4.9
/usr/RL_HOME/users/robin/sstest:
$ python sscan0.py xxx_200mb.dat
fn=xxx_200mb.dat n=3797470 l=181012689 time=7.37
/usr/RL_HOME/users/robin/sstest:
$ python sscan1.py xxx_200mb.dat
fn=xxx_200mb.dat n=3797470 l=181012689 time=129.65
/usr/RL_HOME/users/robin/sstest:
ie the freeBSD vm seems to thrash just as nastily as xp :(
--
Robin Becker
More information about the Python-list
mailing list