Python idiom: Multiple search-and-replace

Aahz Maruch aahz at netcom.com
Sun Apr 16 00:04:04 EDT 2000


In article <20000414084023.A2012 at vislab.epa.gov>,
Randall Hopper  <aa8vb at yahoo.com> wrote:
>
>It's hard to believe we're burning 8.9 sec out of 11.6 seconds (77%) just
>in the simple loop overhead of iterating over lines.  Where's that JIT
>Python interpreter when you need it ;-)  

It's not the loop overhead per se so much as the readlines() overhead.
readline() is relatively inefficient.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"First one back from the bathroom gets to be the bottom."



More information about the Python-list mailing list