[Python-Dev] RE: [Python-checkins] CVS: python/dist/src/Lib fileinput.py,1.5,1.6
Tim Peters
tim.one@home.com
Fri, 5 Jan 2001 12:46:16 -0500
[Guido]
> Modified Files:
> fileinput.py
> Log Message:
> Speed it up by using readlines(sizehint). It's still slower than
> other ways of reading input. :-(
On my box, it's now head-to-head with (maybe even a little quicker than) the
while 1: line-at-a-time way:
total 117615824 chars and 3237568 lines
readlines_sizehint 9.450 9.459
using_fileinput 29.880 29.884
while_readline 30.480 30.506
(stock CVS Python under Win98SE)
So that's a huge improvement!
the-two-people-using-fileinput-should-be-delighted<wink>-ly y'rs - tim