Re: FileInput too slow

2010-01-04 Thread Terry Reedy
On 1/4/2010 5:35 PM, wiso wrote: I'm trying the fileinput module, and I like it, but I don't understand why it's so slow... look: from time import time from fileinput import FileInput file = ['r1_200907.log', 'r1_200908.log', 'r1_200909.log', 'r1_200910.log', 'r1_200911.log'] def f1(): n =

Re: FileInput too slow

2010-01-04 Thread Steven D'Aprano
On Mon, 04 Jan 2010 23:35:02 +0100, wiso wrote: > I'm trying the fileinput module, and I like it, but I don't understand > why it's so slow... Because it is written for convenience, not speed. From the source code: "Performance: this module is unfortunately one of the slower ways of processing

Re: FileInput too slow

2010-01-04 Thread Gabriel Genellina
En Mon, 04 Jan 2010 19:35:02 -0300, wiso escribió: I'm trying the fileinput module, and I like it, but I don't understand why it's so slow... look: from time import time from fileinput import FileInput file = ['r1_200907.log', 'r1_200908.log', 'r1_200909.log', 'r1_200910.log', 'r1_200911