[Python-Dev] OT: A Day in the Life of p5p

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Wed, 28 Jun 2000 22:42:56 +0200


tim wrote:
> Against that, line-at-a-time text file input in particular is =
something that
> every newbie bumps into at once, and Perl does have a monster =
advantage
> there (at least 2x faster, probably closer to 3 on most platforms).

and 2-3x is what you get if you replace readline with readlines,
as described in this note:
http://w1.132.telia.com/~u13208596/notes/readline-performance.htm

it would be very nice if the file object could do something similar
internally (only in text mode, perhaps).  maybe in 1.7?

(as I've mentioned earlier, SRE+faster IO can result in a 10x speedup
for a straightforward while/readline/match loop...)

</F>