On Oct 4, 2:29 am, Chris Rebert <c...@rebertia.com> wrote: > > That line is probably a Very Bad Idea (TM) as it reads the *entire* > enormous file into memory *at once*. It would probably be much better > to iterate over the file, thus only reading one individual line at a > time. I'm betting the massive malloc()ing involved with .readlines() > is a large part of the slowness.
Certainly not. The culprit is line "a = map(noo, a)". Without it execution time = 2.59s (I've just checked it). -- http://mail.python.org/mailman/listinfo/python-list