32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
From: tomjenkins at my-dejanews.com (tomjenkins at my-dejanews.com)
|
|
Date: Mon, 26 Apr 1999 20:47:29 GMT
|
|
Subject: Python too slow for real world
|
|
References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com>
|
|
Message-ID: <7g2jd0$3r0$1@nnrp1.dejanews.com>
|
|
X-UID: 1199
|
|
|
|
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
|
|
|
|
|
|
|
|
|