Huge performance gain compared to perl while loading a text file in a list ...!?

Paul Rubin http
Sun Mar 13 00:56:47 EST 2005


"Marc H." <coolroot at gmail.com> writes:
> I'm fairly new to python, and don't know much of its inner working so
> I wonder if someone could explain to me why it is so much faster in
> python to open a file and load it in a list/array ?

My guess is readlines() in Python is separating on newlines while Perl
is doing a regexp scan for the RS string (I forget what it's called in
Perl).



More information about the Python-list mailing list