Python too slow for real world
tomjenkins at my-dejanews.com
tomjenkins at my-dejanews.com
Mon Apr 26 16:47:29 EDT 1999
In article <613145F79272D211914B0020AFF6401914DAD8 at gandalf.digicool.com>,
Brian Lloyd <Brian at digicool.com> wrote:
> There are also some general optimizations that can be used in
> places where speed is an issue, such as avoiding repeated
> attribute lookups (esp. in loops). This version of your read_write
> function uses the same basic algorithm, but forgoes re for more
> specific tools (slicing, string.split) and has some examples of
> optimizations to mimimize attribute lookups. I haven't timed it
> or anything, but I'd be surprised if it wasn't noticeably
> faster.
Brian, just to followup on your post I profiled his original code and yours:
PII 450, 128M, WinNT
Original: 5.126 seconds
Your Ver: 1.512 seconds
Tom
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
More information about the Python-list
mailing list